From dc63d902e589409bea9eb0643a1ee8d6cf5b4c9f Mon Sep 17 00:00:00 2001 From: lollipopkit Date: Mon, 26 Jun 2023 21:00:13 +0800 Subject: [PATCH] opt. for settings page --- ios/Runner.xcodeproj/project.pbxproj | 12 ++++++------ lib/core/update.dart | 1 + lib/data/res/build_data.dart | 6 +++--- lib/view/page/setting.dart | 19 ++++++++++++------- macos/Runner.xcodeproj/project.pbxproj | 12 ++++++------ 5 files changed, 28 insertions(+), 22 deletions(-) diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 5257e26a..1bef3b79 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -360,7 +360,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 362; + CURRENT_PROJECT_VERSION = 363; DEVELOPMENT_TEAM = BA88US33G6; ENABLE_BITCODE = NO; INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist"; @@ -368,7 +368,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.362; + MARKETING_VERSION = 1.0.363; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -491,7 +491,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 362; + CURRENT_PROJECT_VERSION = 363; DEVELOPMENT_TEAM = BA88US33G6; ENABLE_BITCODE = NO; INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist"; @@ -499,7 +499,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.362; + MARKETING_VERSION = 1.0.363; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -516,7 +516,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 362; + CURRENT_PROJECT_VERSION = 363; DEVELOPMENT_TEAM = BA88US33G6; ENABLE_BITCODE = NO; INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist"; @@ -524,7 +524,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.362; + MARKETING_VERSION = 1.0.363; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; diff --git a/lib/core/update.dart b/lib/core/update.dart index f3601dc8..0c4bfca5 100644 --- a/lib/core/update.dart +++ b/lib/core/update.dart @@ -104,6 +104,7 @@ Future _doUpdate(String url, BuildContext context, S s) async { // rmdir Download Future _rmDownloadApks() async { + if (!isAndroid) return; final dlDir = Directory(pathJoin((await docDir).path, 'Download')); if (await dlDir.exists()) { await dlDir.delete(recursive: true); diff --git a/lib/data/res/build_data.dart b/lib/data/res/build_data.dart index 717eefcd..ff8453dd 100644 --- a/lib/data/res/build_data.dart +++ b/lib/data/res/build_data.dart @@ -2,8 +2,8 @@ class BuildData { static const String name = "ServerBox"; - static const int build = 362; + static const int build = 363; static const String engine = "3.10.0"; - static const String buildAt = "2023-06-23 16:49:18.940704"; - static const int modifications = 14; + static const String buildAt = "2023-06-23 17:27:11.745150"; + static const int modifications = 5; } diff --git a/lib/view/page/setting.dart b/lib/view/page/setting.dart index 9ce8ec26..2aae1040 100644 --- a/lib/view/page/setting.dart +++ b/lib/view/page/setting.dart @@ -92,16 +92,14 @@ class _SettingPageState extends State { body: ListView( padding: const EdgeInsets.symmetric(horizontal: 17), children: [ - // App _buildTitle('App'), _buildApp(), - // Server + _buildTitle(_s.fullScreen), + _buildFullScreen(), _buildTitle(_s.server), _buildServer(), - // SSH _buildTitle('SSH'), _buildSSH(), - // Editor _buildTitle(_s.editor), _buildEditor(), const SizedBox(height: 37), @@ -129,8 +127,6 @@ class _SettingPageState extends State { _buildAppColor(), _buildLaunchPage(), _buildCheckUpdate(), - _buildFullScreen(), - _buildFullScreenJitter(), ]; if (isIOS) { children.add(_buildPushToken()); @@ -143,6 +139,15 @@ class _SettingPageState extends State { ); } + Widget _buildFullScreen() { + return Column( + children: [ + _buildFullScreenSwitch(), + _buildFullScreenJitter(), + ].map((e) => RoundRectCard(e)).toList(), + ); + } + Widget _buildServer() { return Column( children: [ @@ -666,7 +671,7 @@ class _SettingPageState extends State { ); } - Widget _buildFullScreen() { + Widget _buildFullScreenSwitch() { return ListTile( title: Text(_s.fullScreen), trailing: buildSwitch( diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj index af9f4eb7..0eef26f8 100644 --- a/macos/Runner.xcodeproj/project.pbxproj +++ b/macos/Runner.xcodeproj/project.pbxproj @@ -475,9 +475,9 @@ baseConfigurationReference = C1C758C41C4E208965A68933 /* Pods-RunnerTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; - CURRENT_PROJECT_VERSION = 362; + CURRENT_PROJECT_VERSION = 363; GENERATE_INFOPLIST_FILE = YES; - MARKETING_VERSION = 1.0.362; + MARKETING_VERSION = 1.0.363; PRODUCT_BUNDLE_IDENTIFIER = tech.lolli.serverBox.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; @@ -490,9 +490,9 @@ baseConfigurationReference = 15AF97DF993E8968098D6EBE /* Pods-RunnerTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; - CURRENT_PROJECT_VERSION = 362; + CURRENT_PROJECT_VERSION = 363; GENERATE_INFOPLIST_FILE = YES; - MARKETING_VERSION = 1.0.362; + MARKETING_VERSION = 1.0.363; PRODUCT_BUNDLE_IDENTIFIER = tech.lolli.serverBox.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; @@ -505,9 +505,9 @@ baseConfigurationReference = 7CFA7DE7FABA75685DFB6948 /* Pods-RunnerTests.profile.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; - CURRENT_PROJECT_VERSION = 362; + CURRENT_PROJECT_VERSION = 363; GENERATE_INFOPLIST_FILE = YES; - MARKETING_VERSION = 1.0.362; + MARKETING_VERSION = 1.0.363; PRODUCT_BUNDLE_IDENTIFIER = tech.lolli.serverBox.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0;