mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-13 11:35:56 +00:00
Feat. Quick support, ui (#7267)
* Feat. QS ui Signed-off-by: fufesou <shuanglongchen@yeah.net> * Remove 'Quick support' Signed-off-by: fufesou <shuanglongchen@yeah.net> * add help card Signed-off-by: fufesou <shuanglongchen@yeah.net> * use addPostFrameCallback to get child size Signed-off-by: fufesou <shuanglongchen@yeah.net> * Fix. qs, set home window size Signed-off-by: fufesou <shuanglongchen@yeah.net> * Qs, set setResizable for settings page Signed-off-by: fufesou <shuanglongchen@yeah.net> * Qs, help cards margin bottom Signed-off-by: fufesou <shuanglongchen@yeah.net> * Qs, online status, padding Signed-off-by: fufesou <shuanglongchen@yeah.net> * Qs, online status, padding Signed-off-by: fufesou <shuanglongchen@yeah.net> * Qs, online status, use margin instead of padding Signed-off-by: fufesou <shuanglongchen@yeah.net> * Qs, fix, start cm window Signed-off-by: fufesou <shuanglongchen@yeah.net> --------- Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
@@ -98,9 +98,11 @@ Future<void> main(List<String> args) async {
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> initEnv(String appType) async {
|
||||
Future<bool> initEnv(String appType) async {
|
||||
// global shared preference
|
||||
await platformFFI.init(appType);
|
||||
if (!await platformFFI.init(appType)) {
|
||||
return false;
|
||||
}
|
||||
// global FFI, use this **ONLY** for global configuration
|
||||
// for convenience, use global FFI on mobile platform
|
||||
// focus on multi-ffi on desktop first
|
||||
@@ -109,11 +111,14 @@ Future<void> initEnv(String appType) async {
|
||||
_registerEventHandler();
|
||||
// Update the system theme.
|
||||
updateSystemWindowTheme();
|
||||
return true;
|
||||
}
|
||||
|
||||
void runMainApp(bool startService) async {
|
||||
// register uni links
|
||||
await initEnv(kAppTypeMain);
|
||||
if (!await initEnv(kAppTypeMain)) {
|
||||
return;
|
||||
}
|
||||
// trigger connection status updater
|
||||
await bind.mainCheckConnectStatus();
|
||||
if (startService) {
|
||||
@@ -142,11 +147,14 @@ void runMainApp(bool startService) async {
|
||||
}
|
||||
windowManager.setOpacity(1);
|
||||
windowManager.setTitle(getWindowName());
|
||||
windowManager.setResizable(!bind.isQs());
|
||||
});
|
||||
}
|
||||
|
||||
void runMobileApp() async {
|
||||
await initEnv(kAppTypeMain);
|
||||
if (!await initEnv(kAppTypeMain)) {
|
||||
return;
|
||||
}
|
||||
if (isAndroid) androidChannelInit();
|
||||
platformFFI.syncAndroidServiceAppDirConfigPath();
|
||||
await Future.wait([gFFI.abModel.loadCache(), gFFI.groupModel.loadCache()]);
|
||||
@@ -159,7 +167,9 @@ void runMultiWindow(
|
||||
Map<String, dynamic> argument,
|
||||
String appType,
|
||||
) async {
|
||||
await initEnv(appType);
|
||||
if (!await initEnv(appType)) {
|
||||
return;
|
||||
}
|
||||
final title = getWindowName();
|
||||
// set prevent close to true, we handle close event manually
|
||||
WindowController.fromWindowId(kWindowId!).setPreventClose(true);
|
||||
@@ -222,7 +232,9 @@ void runMultiWindow(
|
||||
}
|
||||
|
||||
void runConnectionManagerScreen() async {
|
||||
await initEnv(kAppTypeConnectionManager);
|
||||
if (!await initEnv(kAppTypeConnectionManager)) {
|
||||
return;
|
||||
}
|
||||
_runApp(
|
||||
'',
|
||||
const DesktopServerPage(),
|
||||
@@ -325,7 +337,9 @@ void _runApp(
|
||||
|
||||
void runInstallPage() async {
|
||||
await windowManager.ensureInitialized();
|
||||
await initEnv(kAppTypeMain);
|
||||
if (!await initEnv(kAppTypeMain)) {
|
||||
return;
|
||||
}
|
||||
_runApp('', const InstallPage(), MyTheme.currentThemeMode());
|
||||
WindowOptions windowOptions =
|
||||
getHiddenTitleBarWindowOptions(size: Size(800, 600), center: true);
|
||||
|
||||
Reference in New Issue
Block a user