commit
8d816ee0e8
@ -368,7 +368,7 @@ class MyTheme {
|
||||
|
||||
static void changeDarkMode(ThemeMode mode) async {
|
||||
Get.changeThemeMode(mode);
|
||||
if (desktopType == DesktopType.main) {
|
||||
if (desktopType == DesktopType.main || isAndroid || isIOS) {
|
||||
if (mode == ThemeMode.system) {
|
||||
await bind.mainSetLocalOption(key: kCommConfKeyTheme, value: '');
|
||||
} else {
|
||||
|
@ -14,7 +14,10 @@ const String kPeerPlatformAndroid = "Android";
|
||||
|
||||
/// [kAppTypeMain] used by 'Desktop Main Page' , 'Mobile (Client and Server)', "Install Page"
|
||||
const String kAppTypeMain = "main";
|
||||
|
||||
/// [kAppTypeConnectionManager] only for 'Desktop CM Page'
|
||||
const String kAppTypeConnectionManager = "cm";
|
||||
|
||||
const String kAppTypeDesktopRemote = "remote";
|
||||
const String kAppTypeDesktopFileTransfer = "file transfer";
|
||||
const String kAppTypeDesktopPortForward = "port forward";
|
||||
|
@ -263,8 +263,11 @@ class ServerModel with ChangeNotifier {
|
||||
toggleInput() {
|
||||
if (_inputOk) {
|
||||
parent.target?.invokeMethod("stop_input");
|
||||
bind.mainSetOption(key: "enable-keyboard", value: 'N');
|
||||
} else {
|
||||
if (parent.target != null) {
|
||||
/// the result of toggle-on depends on user actions in the settings page.
|
||||
/// handle result, see [ServerModel.changeStatue]
|
||||
showInputWarnAlert(parent.target!);
|
||||
}
|
||||
}
|
||||
|
@ -26,8 +26,14 @@ use std::{
|
||||
sync::{Arc, RwLock},
|
||||
};
|
||||
|
||||
/// tag "main" for [Desktop Main Page] and [Mobile (Client and Server)] (the mobile don't need multiple windows, only one global event stream is needed)
|
||||
/// tag "cm" only for [Desktop CM Page]
|
||||
pub(super) const APP_TYPE_MAIN: &str = "main";
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
pub(super) const APP_TYPE_CM: &str = "cm";
|
||||
#[cfg(any(target_os = "android", target_os = "ios"))]
|
||||
pub(super) const APP_TYPE_CM: &str = "main";
|
||||
|
||||
pub(super) const APP_TYPE_DESKTOP_REMOTE: &str = "remote";
|
||||
pub(super) const APP_TYPE_DESKTOP_FILE_TRANSFER: &str = "file transfer";
|
||||
pub(super) const APP_TYPE_DESKTOP_PORT_FORWARD: &str = "port forward";
|
||||
|
@ -349,7 +349,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Security", "安全"),
|
||||
("Theme", "主题"),
|
||||
("Dark Theme", "暗黑主题"),
|
||||
("Light Theme", ""),
|
||||
("Light Theme", "明亮主题"),
|
||||
("Dark", "黑暗"),
|
||||
("Light", "明亮"),
|
||||
("Follow System", "跟随系统"),
|
||||
|
@ -349,7 +349,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Security", "安全"),
|
||||
("Theme", "主題"),
|
||||
("Dark Theme", "暗黑主題"),
|
||||
("Light Theme", ""),
|
||||
("Light Theme", "明亮主題"),
|
||||
("Dark", "黑暗"),
|
||||
("Light", "明亮"),
|
||||
("Follow System", "跟隨系統"),
|
||||
|
Loading…
Reference in New Issue
Block a user