cm get config

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2023-11-08 11:28:59 +08:00
parent 36b574a5f8
commit 1902134f03
6 changed files with 33 additions and 9 deletions

View File

@@ -91,7 +91,7 @@ Future<void> main(List<String> args) async {
debugPrint("--cm started");
desktopType = DesktopType.cm;
await windowManager.ensureInitialized();
runConnectionManagerScreen(args.contains('--hide'));
runConnectionManagerScreen();
} else if (args.contains('--install')) {
runInstallPage();
} else {
@@ -225,13 +225,14 @@ void runMultiWindow(
WindowController.fromWindowId(kWindowId!).show();
}
void runConnectionManagerScreen(bool hide) async {
void runConnectionManagerScreen() async {
await initEnv(kAppTypeConnectionManager);
_runApp(
'',
const DesktopServerPage(),
MyTheme.currentThemeMode(),
);
final hide = await bind.cmGetConfig(name: "hide_cm") == 'true';
gFFI.serverModel.hideCm = hide;
if (hide) {
await hideCmWindow(isStartup: true);