diff --git a/.gitignore b/.gitignore index a19ef9ae7..30e1aafe2 100644 --- a/.gitignore +++ b/.gitignore @@ -51,4 +51,6 @@ lib/generated_bridge.dart # build cache in examples examples/**/target/ # === -vcpkg_installed \ No newline at end of file +vcpkg_installed +flutter/lib/generated_plugin_registrant.dart +libsciter.dylib diff --git a/flutter/lib/models/group_model.dart b/flutter/lib/models/group_model.dart index c2a50afb3..50459ffe9 100644 --- a/flutter/lib/models/group_model.dart +++ b/flutter/lib/models/group_model.dart @@ -26,6 +26,7 @@ class GroupModel { GroupModel(this.parent); Future pull({force = true, quiet = false}) async { + if (bind.isDisableGroupPanel()) return; if (!gFFI.userModel.isLogin || groupLoading.value) return; if (!force && initialized) return; if (!quiet) { diff --git a/flutter/lib/models/peer_tab_model.dart b/flutter/lib/models/peer_tab_model.dart index 5247c1bbb..3c0fe636d 100644 --- a/flutter/lib/models/peer_tab_model.dart +++ b/flutter/lib/models/peer_tab_model.dart @@ -42,7 +42,7 @@ class PeerTabModel with ChangeNotifier { true, !isWeb, !(bind.isDisableAb() || bind.isDisableAccount()), - !bind.isDisableAccount(), + !(bind.isDisableGroupPanel() || bind.isDisableAccount()), ]); final List _isVisible = List.filled(maxTabCount, true, growable: false); List get isVisibleEnabled => () { diff --git a/flutter/lib/web/bridge.dart b/flutter/lib/web/bridge.dart index 3589b3f31..272171a14 100644 --- a/flutter/lib/web/bridge.dart +++ b/flutter/lib/web/bridge.dart @@ -1460,6 +1460,10 @@ class RustdeskImpl { return false; } + bool isDisableGroupPanel({dynamic hint}) { + return false; + } + bool isDisableAccount({dynamic hint}) { return false; } diff --git a/src/flutter_ffi.rs b/src/flutter_ffi.rs index dae8d3fc1..20ff89b13 100644 --- a/src/flutter_ffi.rs +++ b/src/flutter_ffi.rs @@ -2,7 +2,8 @@ use crate::{ client::file_trait::FileManager, common::{is_keyboard_mode_supported, make_fd_to_json}, flutter::{ - self, session_add, session_add_existed, session_start_, sessions, try_sync_peer_option, FlutterHandler, + self, session_add, session_add_existed, session_start_, sessions, try_sync_peer_option, + FlutterHandler, }, input::*, ui_interface::{self, *}, @@ -1905,6 +1906,10 @@ pub fn is_disable_account() -> SyncReturn { SyncReturn(config::is_disable_account()) } +pub fn is_disable_group_panel() -> SyncReturn { + SyncReturn(LocalConfig::get_option("disable-group-panel") == "Y") +} + // windows only pub fn is_disable_installation() -> SyncReturn { SyncReturn(config::is_disable_installation())