mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-24 05:31:03 +03:00
Refact/options (#9318)
* refact options Signed-off-by: fufesou <linlong1266@gmail.com> * Remove unused msg Signed-off-by: fufesou <linlong1266@gmail.com> * web, toggle virtual display Signed-off-by: fufesou <linlong1266@gmail.com> --------- Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
@@ -1718,7 +1718,9 @@ class _KeyboardMenu extends StatelessWidget {
|
||||
if (value == null) return;
|
||||
await bind.sessionToggleOption(
|
||||
sessionId: ffi.sessionId, value: kOptionToggleViewOnly);
|
||||
ffiModel.setViewOnly(id, value);
|
||||
final viewOnly = await bind.sessionGetToggleOption(
|
||||
sessionId: ffi.sessionId, arg: kOptionToggleViewOnly);
|
||||
ffiModel.setViewOnly(id, viewOnly ?? value);
|
||||
}
|
||||
: null,
|
||||
ffi: ffi,
|
||||
|
||||
@@ -795,7 +795,7 @@ class FfiModel with ChangeNotifier {
|
||||
isRefreshing = false;
|
||||
}
|
||||
Map<String, dynamic> features = json.decode(evt['features']);
|
||||
_pi.features.privacyMode = features['privacy_mode'] == 1;
|
||||
_pi.features.privacyMode = features['privacy_mode'] == true;
|
||||
if (!isCache) {
|
||||
handleResolutions(peerId, evt["resolutions"]);
|
||||
}
|
||||
|
||||
@@ -196,8 +196,8 @@ class RustdeskImpl {
|
||||
required bool on,
|
||||
dynamic hint}) {
|
||||
return Future(() => js.context.callMethod('setByName', [
|
||||
'option:toggle',
|
||||
jsonEncode({implKey, on})
|
||||
'toggle_privacy_mode',
|
||||
jsonEncode({'impl_key': implKey, 'on': on})
|
||||
]));
|
||||
}
|
||||
|
||||
@@ -1204,8 +1204,10 @@ class RustdeskImpl {
|
||||
required int index,
|
||||
required bool on,
|
||||
dynamic hint}) {
|
||||
// TODO
|
||||
throw UnimplementedError();
|
||||
return Future(() => js.context.callMethod('setByName', [
|
||||
'toggle_virtual_display',
|
||||
jsonEncode({'index': index, 'on': on})
|
||||
]));
|
||||
}
|
||||
|
||||
Future<void> mainSetHomeDir({required String home, dynamic hint}) {
|
||||
|
||||
Reference in New Issue
Block a user