From 50af28957436c54c042c930aed18717a8a944a22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?lollipopkit=F0=9F=8F=B3=EF=B8=8F=E2=80=8D=E2=9A=A7?= =?UTF-8?q?=EF=B8=8F?= <10864310+lollipopkit@users.noreply.github.com> Date: Sat, 21 Sep 2024 11:01:41 +0800 Subject: [PATCH] migrate: fl_lib --- README.md | 2 +- README_zh.md | 2 +- ios/Runner.xcodeproj/project.pbxproj | 36 +++++++++++++------------- lib/core/extension/build.dart | 5 ---- lib/data/model/app/shell_func.dart | 2 +- lib/data/provider/server.dart | 3 +-- lib/data/res/build_data.dart | 4 +-- lib/data/res/github_id.dart | 1 + lib/data/store/setting.dart | 1 - lib/main.dart | 3 +-- lib/view/page/home/appbar.dart | 3 ++- lib/view/page/home/home.dart | 3 +-- macos/Runner.xcodeproj/project.pbxproj | 12 ++++----- pubspec.lock | 16 +++++++++--- pubspec.yaml | 7 ++--- 15 files changed, 51 insertions(+), 49 deletions(-) delete mode 100644 lib/core/extension/build.dart diff --git a/README.md b/README.md index c71b41210..dd408fdca 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Please only download pkgs from the source that **you trust**! ## 🔖 Feature - `Status chart` (CPU, Sensors, GPU...), `SSH` Term, `SFTP`, `Docker & Process & Systemd`... - Platform specific: `Bio auth`、`Msg push`、`Home widget`、`watchOS App`... -- English, 简体中文; Deutsch [@its-tom](https://github.com/its-tom), 繁體中文 [@kalashnikov](https://github.com/kalashnikov), Indonesian [@azkadev](https://github.com/azkadev), Français [@FrancXPT](https://github.com/FrancXPT), Dutch [@QazCetelic](https://github.com/QazCetelic), Türkçe [@mikropsoft](https://github.com/mikropsoft); Español, Русский язык, Português, 日本語 (Generated by GPT) +- English, 简体中文; Deutsch [@its-tom](https://github.com/its-tom), 繁體中文 [@kalashnikov](https://github.com/kalashnikov), Indonesian [@azkadev](https://github.com/azkadev), Français [@FrancXPT](https://github.com/FrancXPT), Dutch [@QazCetelic](https://github.com/QazCetelic), Türkçe [@mikropsoft](https://github.com/mikropsoft), українська мова [@CakesTwix](https://github.com/CakesTwix); Español, Русский язык, Português, 日本語 (Generated by GPT) ## 🆘 Help diff --git a/README_zh.md b/README_zh.md index 2dc52a76e..371385a03 100644 --- a/README_zh.md +++ b/README_zh.md @@ -43,7 +43,7 @@ Linux / Windows | [GitHub](https://github.com/lollipopkit/flutter_server_box/rel - 本地化 - English, 简体中文 - Español, Русский язык, Português, 日本語 (Generated by GPT) - - Deutsch [@its-tom](https://github.com/its-tom), 繁體中文 [@kalashnikov](https://github.com/kalashnikov), Indonesian [@azkadev](https://github.com/azkadev), Français [@FrancXPT](https://github.com/FrancXPT), Dutch [@QazCetelic](https://github.com/QazCetelic), Türkçe [@mikropsoft](https://github.com/mikropsoft); + - Deutsch [@its-tom](https://github.com/its-tom), 繁體中文 [@kalashnikov](https://github.com/kalashnikov), Indonesian [@azkadev](https://github.com/azkadev), Français [@FrancXPT](https://github.com/FrancXPT), Dutch [@QazCetelic](https://github.com/QazCetelic), Türkçe [@mikropsoft](https://github.com/mikropsoft), українська мова [@CakesTwix](https://github.com/CakesTwix); - 感谢贡献者们! diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index ce509d48b..886905d13 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -690,7 +690,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 1076; + CURRENT_PROJECT_VERSION = 1091; DEVELOPMENT_TEAM = BA88US33G6; ENABLE_BITCODE = NO; INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist"; @@ -700,7 +700,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.1076; + MARKETING_VERSION = 1.0.1091; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -826,7 +826,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 1076; + CURRENT_PROJECT_VERSION = 1091; DEVELOPMENT_TEAM = BA88US33G6; ENABLE_BITCODE = NO; INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist"; @@ -836,7 +836,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.1076; + MARKETING_VERSION = 1.0.1091; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -854,7 +854,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 1076; + CURRENT_PROJECT_VERSION = 1091; DEVELOPMENT_TEAM = BA88US33G6; ENABLE_BITCODE = NO; INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist"; @@ -864,7 +864,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.1076; + MARKETING_VERSION = 1.0.1091; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -885,7 +885,7 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1076; + CURRENT_PROJECT_VERSION = 1091; DEVELOPMENT_TEAM = BA88US33G6; GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; @@ -898,7 +898,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.0.1076; + MARKETING_VERSION = 1.0.1091; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget; @@ -924,7 +924,7 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1076; + CURRENT_PROJECT_VERSION = 1091; DEVELOPMENT_TEAM = BA88US33G6; GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; @@ -937,7 +937,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.0.1076; + MARKETING_VERSION = 1.0.1091; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -960,7 +960,7 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1076; + CURRENT_PROJECT_VERSION = 1091; DEVELOPMENT_TEAM = BA88US33G6; GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; @@ -973,7 +973,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.0.1076; + MARKETING_VERSION = 1.0.1091; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -996,7 +996,7 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1076; + CURRENT_PROJECT_VERSION = 1091; DEVELOPMENT_ASSET_PATHS = ""; DEVELOPMENT_TEAM = BA88US33G6; ENABLE_PREVIEWS = YES; @@ -1008,7 +1008,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.1076; + MARKETING_VERSION = 1.0.1091; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.WatchEnd; @@ -1037,7 +1037,7 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1076; + CURRENT_PROJECT_VERSION = 1091; DEVELOPMENT_ASSET_PATHS = ""; DEVELOPMENT_TEAM = BA88US33G6; ENABLE_PREVIEWS = YES; @@ -1049,7 +1049,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.1076; + MARKETING_VERSION = 1.0.1091; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.WatchEnd; PRODUCT_NAME = ServerBox; @@ -1075,7 +1075,7 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1076; + CURRENT_PROJECT_VERSION = 1091; DEVELOPMENT_ASSET_PATHS = ""; DEVELOPMENT_TEAM = BA88US33G6; ENABLE_PREVIEWS = YES; @@ -1087,7 +1087,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.1076; + MARKETING_VERSION = 1.0.1091; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.WatchEnd; PRODUCT_NAME = ServerBox; diff --git a/lib/core/extension/build.dart b/lib/core/extension/build.dart deleted file mode 100644 index f7052a889..000000000 --- a/lib/core/extension/build.dart +++ /dev/null @@ -1,5 +0,0 @@ -import 'package:server_box/data/res/build_data.dart'; - -extension BuildDataX on BuildData { - static const versionStr = 'v1.0.${BuildData.build}'; -} diff --git a/lib/data/model/app/shell_func.dart b/lib/data/model/app/shell_func.dart index f95e34e9b..bb5b83928 100644 --- a/lib/data/model/app/shell_func.dart +++ b/lib/data/model/app/shell_func.dart @@ -54,7 +54,7 @@ enum ShellFunc { return ''' mkdir -p $scriptDir cat > $scriptPath -chmod 744 $scriptPath +chmod 755 $scriptPath '''; } diff --git a/lib/data/provider/server.dart b/lib/data/provider/server.dart index 54e0e982f..1339c1bc2 100644 --- a/lib/data/provider/server.dart +++ b/lib/data/provider/server.dart @@ -306,11 +306,10 @@ class ServerProvider extends Provider { _setServerState(s, ServerConn.connected); - final scriptRaw = ShellFunc.allScript(spi.custom?.cmds).uint8List; - try { final (_, writeScriptResult) = await sv.client!.exec( (session) async { + final scriptRaw = ShellFunc.allScript(spi.custom?.cmds).uint8List; session.stdin.add(scriptRaw); session.stdin.close(); }, diff --git a/lib/data/res/build_data.dart b/lib/data/res/build_data.dart index c38d7a3d6..74fbb0f53 100644 --- a/lib/data/res/build_data.dart +++ b/lib/data/res/build_data.dart @@ -1,8 +1,8 @@ // This file is generated by fl_build. Do not edit. // ignore_for_file: prefer_single_quotes -class BuildData { +abstract class BuildData { static const String name = "ServerBox"; - static const int build = 1076; + static const int build = 1091; static const int script = 58; } diff --git a/lib/data/res/github_id.dart b/lib/data/res/github_id.dart index cd646543b..f8c38bba7 100644 --- a/lib/data/res/github_id.dart +++ b/lib/data/res/github_id.dart @@ -16,6 +16,7 @@ abstract final class GithubIds { 'Liloupar', 'dccif', 'mikropsoft', + 'CakesTwix', }; static const participants = { diff --git a/lib/data/store/setting.dart b/lib/data/store/setting.dart index 8ee2cd691..59b46b177 100644 --- a/lib/data/store/setting.dart +++ b/lib/data/store/setting.dart @@ -127,7 +127,6 @@ class SettingStore extends PersistentStore { /// Whether use system's primary color as the app's primary color late final useSystemPrimaryColor = property('useSystemPrimaryColor', false); - /// Only valid on iOS / Android / Windows late final useBioAuth = property('useBioAuth', false); diff --git a/lib/main.dart b/lib/main.dart index 4eb06750b..2e9a3141d 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -25,7 +25,6 @@ import 'package:server_box/data/provider/server.dart'; import 'package:server_box/data/provider/sftp.dart'; import 'package:server_box/data/provider/snippet.dart'; import 'package:server_box/data/res/build_data.dart'; -import 'package:server_box/data/res/misc.dart'; import 'package:server_box/data/res/store.dart'; import 'package:server_box/data/store/no_backup.dart'; @@ -53,7 +52,7 @@ void _runInZone(void Function() body) { Future _initApp() async { WidgetsFlutterBinding.ensureInitialized(); - await Paths.init(BuildData.name, bakName: Miscs.bakFileName); + await Paths.init(BuildData.name, bakName: 'srvbox_bak.json'); await _initData(); _setupDebug(); diff --git a/lib/view/page/home/appbar.dart b/lib/view/page/home/appbar.dart index 389846fef..eb1d0d697 100644 --- a/lib/view/page/home/appbar.dart +++ b/lib/view/page/home/appbar.dart @@ -15,7 +15,8 @@ final class _AppBar extends CustomAppBar { @override Widget build(BuildContext context) { final placeholder = SizedBox( - height: CustomAppBar.sysStatusBarHeight ?? 0 + MediaQuery.of(context).padding.top, + height: CustomAppBar.sysStatusBarHeight ?? + 0 + MediaQuery.of(context).padding.top, ); return selectIndex.listenVal( (idx) { diff --git a/lib/view/page/home/home.dart b/lib/view/page/home/home.dart index 36d36bfe7..05e5c31cc 100644 --- a/lib/view/page/home/home.dart +++ b/lib/view/page/home/home.dart @@ -4,7 +4,6 @@ import 'package:fl_lib/fl_lib.dart'; import 'package:flutter/material.dart'; import 'package:icons_plus/icons_plus.dart'; import 'package:server_box/core/channel/home_widget.dart'; -import 'package:server_box/core/extension/build.dart'; import 'package:server_box/core/extension/context/locale.dart'; import 'package:server_box/core/route.dart'; import 'package:server_box/data/model/app/tab.dart'; @@ -218,7 +217,7 @@ class _HomePageState extends State children: [ _buildIcon(), const Text( - '${BuildData.name}\n${BuildDataX.versionStr}', + '${BuildData.name}\nv${BuildData.build}', textAlign: TextAlign.center, style: UIs.text15, ), diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj index 5482e9b64..2459152f4 100644 --- a/macos/Runner.xcodeproj/project.pbxproj +++ b/macos/Runner.xcodeproj/project.pbxproj @@ -471,7 +471,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1076; + CURRENT_PROJECT_VERSION = 1091; DEVELOPMENT_TEAM = BA88US33G6; INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = "Server Box"; @@ -481,7 +481,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = 1.0.1076; + MARKETING_VERSION = 1.0.1091; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox; PRODUCT_NAME = "Server Box"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -608,7 +608,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1076; + CURRENT_PROJECT_VERSION = 1091; DEVELOPMENT_TEAM = BA88US33G6; INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = "Server Box"; @@ -618,7 +618,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = 1.0.1076; + MARKETING_VERSION = 1.0.1091; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox; PRODUCT_NAME = "Server Box"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -638,7 +638,7 @@ "CODE_SIGN_IDENTITY[sdk=macosx*]" = "3rd Party Mac Developer Application"; CODE_SIGN_STYLE = Manual; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 1076; + CURRENT_PROJECT_VERSION = 1091; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=macosx*]" = BA88US33G6; INFOPLIST_FILE = Runner/Info.plist; @@ -649,7 +649,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = 1.0.1076; + MARKETING_VERSION = 1.0.1091; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox; PRODUCT_NAME = "Server Box"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/pubspec.lock b/pubspec.lock index d39b6d686..9b0fa1868 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -453,8 +453,8 @@ packages: dependency: "direct dev" description: path: "." - ref: "v1.0.43" - resolved-ref: df503ed1598f4fc6a3d3904491d54a1738d4be98 + ref: "v1.0.44" + resolved-ref: cc77a409966fcf104933aa63be05938e029cf4b3 url: "https://github.com/lppcg/fl_build.git" source: git version: "1.0.0" @@ -470,8 +470,8 @@ packages: dependency: "direct main" description: path: "." - ref: "v1.0.167" - resolved-ref: "655787d3766c3795c8185e261c15fae620f0e7f6" + ref: "v1.0.183" + resolved-ref: "1333b6269a4caa54c58324c66558e09a0525784b" url: "https://github.com/lppcg/fl_lib" source: git version: "0.0.1" @@ -549,6 +549,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.21" + flutter_reorderable_grid_view: + dependency: "direct main" + description: + name: flutter_reorderable_grid_view + sha256: "9f299ddb6772b3db0cbdf143c86bb252308cd600f42ad9f17e61d34d111aa32d" + url: "https://pub.dev" + source: hosted + version: "5.1.0" flutter_svg: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index d730e105d..0249ee148 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: server_box description: server status & toolbox app. publish_to: 'none' -version: 1.0.1076+1076 +version: 1.0.1091+1091 environment: sdk: ">=3.0.0" @@ -28,6 +28,7 @@ dependencies: extended_image: ^8.2.1 json_annotation: ^4.9.0 choice: ^2.3.2 + flutter_reorderable_grid_view: ^5.1.0 dartssh2: git: url: https://github.com/lollipopkit/dartssh2 @@ -59,7 +60,7 @@ dependencies: fl_lib: git: url: https://github.com/lppcg/fl_lib - ref: v1.0.167 + ref: v1.0.183 dependency_overrides: # dartssh2: @@ -82,7 +83,7 @@ dev_dependencies: fl_build: git: url: https://github.com/lppcg/fl_build.git - ref: v1.0.43 + ref: v1.0.44 flutter: generate: true