From a15c04956c22d7c8398244105cd0a5bb6b93816b 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: Sun, 4 Aug 2024 12:02:57 +0800 Subject: [PATCH] opt.: `TipText` --- ios/Runner.xcodeproj/project.pbxproj | 36 +++++++------- lib/data/res/build_data.dart | 2 +- lib/intro.dart | 16 +++--- lib/view/page/setting/entry.dart | 54 +++++++++------------ lib/view/page/setting/platform/android.dart | 4 +- macos/Runner.xcodeproj/project.pbxproj | 12 ++--- pubspec.lock | 4 +- pubspec.yaml | 4 +- 8 files changed, 60 insertions(+), 72 deletions(-) diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 41a323b3..8bca659a 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 = 1048; + CURRENT_PROJECT_VERSION = 1049; DEVELOPMENT_TEAM = BA88US33G6; ENABLE_BITCODE = NO; INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist"; @@ -700,7 +700,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.1048; + MARKETING_VERSION = 1.0.1049; 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 = 1048; + CURRENT_PROJECT_VERSION = 1049; DEVELOPMENT_TEAM = BA88US33G6; ENABLE_BITCODE = NO; INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist"; @@ -836,7 +836,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.1048; + MARKETING_VERSION = 1.0.1049; 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 = 1048; + CURRENT_PROJECT_VERSION = 1049; DEVELOPMENT_TEAM = BA88US33G6; ENABLE_BITCODE = NO; INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist"; @@ -864,7 +864,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.1048; + MARKETING_VERSION = 1.0.1049; 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 = 1048; + CURRENT_PROJECT_VERSION = 1049; 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.1048; + MARKETING_VERSION = 1.0.1049; 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 = 1048; + CURRENT_PROJECT_VERSION = 1049; 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.1048; + MARKETING_VERSION = 1.0.1049; 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 = 1048; + CURRENT_PROJECT_VERSION = 1049; 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.1048; + MARKETING_VERSION = 1.0.1049; 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 = 1048; + CURRENT_PROJECT_VERSION = 1049; DEVELOPMENT_ASSET_PATHS = ""; DEVELOPMENT_TEAM = BA88US33G6; ENABLE_PREVIEWS = YES; @@ -1008,7 +1008,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.1048; + MARKETING_VERSION = 1.0.1049; 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 = 1048; + CURRENT_PROJECT_VERSION = 1049; DEVELOPMENT_ASSET_PATHS = ""; DEVELOPMENT_TEAM = BA88US33G6; ENABLE_PREVIEWS = YES; @@ -1049,7 +1049,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.1048; + MARKETING_VERSION = 1.0.1049; 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 = 1048; + CURRENT_PROJECT_VERSION = 1049; DEVELOPMENT_ASSET_PATHS = ""; DEVELOPMENT_TEAM = BA88US33G6; ENABLE_PREVIEWS = YES; @@ -1087,7 +1087,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.1048; + MARKETING_VERSION = 1.0.1049; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.WatchEnd; PRODUCT_NAME = ServerBox; diff --git a/lib/data/res/build_data.dart b/lib/data/res/build_data.dart index d1cc188d..3a5de300 100644 --- a/lib/data/res/build_data.dart +++ b/lib/data/res/build_data.dart @@ -2,6 +2,6 @@ class BuildData { static const String name = "ServerBox"; - static const int build = 1048; + static const int build = 1049; static const int script = 56; } diff --git a/lib/intro.dart b/lib/intro.dart index e61e7aeb..8b762cb7 100644 --- a/lib/intro.dart +++ b/lib/intro.dart @@ -59,34 +59,30 @@ final class _IntroPage extends StatelessWidget { ).cardx, ListTile( leading: const Icon(Icons.update), - title: Text(l10n.autoCheckUpdate), - subtitle: Text(l10n.fdroidReleaseTip, style: UIs.textGrey), + title: TipText(l10n.autoCheckUpdate, l10n.fdroidReleaseTip), trailing: StoreSwitch(prop: _setting.autoCheckAppUpdate), ).cardx, ListTile( leading: const Icon(MingCute.delete_2_fill), - title: const Text('rm -r'), - subtitle: Text(l10n.sftpRmrDirSummary, style: UIs.textGrey), + title: TipText('rm -r', l10n.sftpRmrDirSummary), trailing: StoreSwitch(prop: _setting.sftpRmrDir), ).cardx, ListTile( leading: const Icon(MingCute.chart_line_line, size: _kIconSize), - title: Text(l10n.stat), - subtitle: Text(l10n.parseContainerStatsTip, style: UIs.textGrey), + title: TipText(l10n.stat, l10n.parseContainerStatsTip), trailing: StoreSwitch(prop: _setting.containerParseStat), ).cardx, ListTile( leading: const Icon(OctIcons.cpu), - title: Text(l10n.noLineChartForCpu), - subtitle: Text(l10n.cpuViewAsProgressTip, style: UIs.textGrey), + title: TipText(l10n.noLineChartForCpu, l10n.cpuViewAsProgressTip), trailing: StoreSwitch(prop: _setting.cpuViewAsProgress), ).cardx, ListTile( leading: const Icon(Bootstrap.alphabet), - title: Text(l10n.letterCache), - subtitle: Text(l10n.letterCacheTip, style: UIs.textGrey), + title: TipText(l10n.letterCache, l10n.letterCacheTip), trailing: StoreSwitch(prop: _setting.letterCache), ).cardx, + UIs.height77, ], ); } diff --git a/lib/view/page/setting/entry.dart b/lib/view/page/setting/entry.dart index e5b19958..db3533f0 100644 --- a/lib/view/page/setting/entry.dart +++ b/lib/view/page/setting/entry.dart @@ -444,10 +444,7 @@ class _SettingPageState extends State { leading: const Icon(MingCute.font_size_line), // title: Text(l10n.fontSize), // subtitle: Text(l10n.termFontSizeTip, style: UIs.textGrey), - title: TipText( - tip: l10n.termFontSizeTip, - text: l10n.fontSize, - ), + title: TipText(l10n.fontSize, l10n.termFontSizeTip), trailing: ValBuilder( listenable: _setting.termFontSize.listenable(), builder: (val) => Text( @@ -581,10 +578,7 @@ class _SettingPageState extends State { leading: const Icon(Bootstrap.phone_landscape_fill), // title: Text(l10n.fullScreen), // subtitle: Text(l10n.fullScreenTip, style: UIs.textGrey), - title: TipText( - tip: l10n.fullScreenTip, - text: l10n.fullScreen, - ), + title: TipText(l10n.fullScreen, l10n.fullScreenTip), trailing: StoreSwitch( prop: _setting.fullScreen, callback: (_) => RNodes.app.notify(), @@ -665,8 +659,8 @@ class _SettingPageState extends State { // title: Text(l10n.openLastPath), // subtitle: Text(l10n.openLastPathTip, style: UIs.textGrey), title: TipText( - tip: l10n.openLastPathTip, - text: l10n.openLastPath, + l10n.openLastPath, + l10n.openLastPathTip ), trailing: StoreSwitch(prop: _setting.sftpOpenLastPath), ); @@ -744,8 +738,8 @@ class _SettingPageState extends State { // title: Text(l10n.textScaler), // subtitle: Text(l10n.textScalerTip, style: UIs.textGrey), title: TipText( - tip: l10n.textScalerTip, - text: l10n.textScaler, + l10n.textScaler, + l10n.textScalerTip ), trailing: ValBuilder( listenable: _setting.textFactor.listenable(), @@ -797,8 +791,8 @@ class _SettingPageState extends State { // title: Text(l10n.location), // subtitle: Text(l10n.moveOutServerFuncBtnsHelp, style: UIs.text13Grey), title: TipText( - tip: l10n.moveOutServerFuncBtnsHelp, - text: l10n.location, + l10n.location, + l10n.moveOutServerFuncBtnsHelp ), trailing: StoreSwitch(prop: _setting.moveOutServerTabFuncBtns), ); @@ -877,7 +871,7 @@ class _SettingPageState extends State { Widget _buildSftpRmrDir() { return ListTile( leading: const Icon(MingCute.delete_2_fill), - title: TipText(text: 'rm -r', tip: l10n.sftpRmrDirSummary), + title: TipText('rm -r', l10n.sftpRmrDirSummary), trailing: StoreSwitch(prop: _setting.sftpRmrDir), ); } @@ -887,8 +881,8 @@ class _SettingPageState extends State { // title: Text(l10n.doubleColumnMode), // subtitle: Text(l10n.doubleColumnTip, style: UIs.textGrey), title: TipText( - tip: l10n.doubleColumnTip, - text: l10n.doubleColumnMode, + l10n.doubleColumnMode, + l10n.doubleColumnTip ), trailing: StoreSwitch(prop: _setting.doubleColumnServersPage), ); @@ -915,8 +909,8 @@ class _SettingPageState extends State { // title: Text(l10n.highlight), // subtitle: Text(l10n.editorHighlightTip, style: UIs.textGrey), title: TipText( - tip: l10n.editorHighlightTip, - text: l10n.highlight, + l10n.highlight, + l10n.editorHighlightTip ), trailing: StoreSwitch(prop: _setting.editorHighlight), ); @@ -924,7 +918,7 @@ class _SettingPageState extends State { Widget _buildCollapseUI() { return ListTile( - title: TipText(text: 'UI ${libL10n.fold}', tip: l10n.collapseUITip), + title: TipText('UI ${libL10n.fold}', l10n.collapseUITip), trailing: StoreSwitch(prop: _setting.collapseUIDefault), ); } @@ -941,8 +935,8 @@ class _SettingPageState extends State { return ListTile( leading: const Icon(EvaIcons.person_done), title: TipText( - tip: l10n.containerTrySudoTip, - text: l10n.trySudo, + l10n.trySudo, + l10n.containerTrySudoTip ), trailing: StoreSwitch(prop: _setting.containerTrySudo), ); @@ -962,8 +956,8 @@ class _SettingPageState extends State { // title: Text(l10n.parseContainerStats), // subtitle: Text(l10n.parseContainerStatsTip, style: UIs.textGrey), title: TipText( - tip: l10n.parseContainerStatsTip, - text: l10n.stat, + l10n.stat, + l10n.parseContainerStatsTip ), trailing: StoreSwitch(prop: _setting.containerParseStat), ); @@ -989,8 +983,8 @@ class _SettingPageState extends State { // title: Text(l10n.rememberPwdInMem), // subtitle: Text(l10n.rememberPwdInMemTip, style: UIs.textGrey), title: TipText( - tip: l10n.rememberPwdInMemTip, - text: l10n.rememberPwdInMem, + l10n.rememberPwdInMem, + l10n.rememberPwdInMemTip ), trailing: StoreSwitch(prop: _setting.rememberPwdInMem), ); @@ -1155,7 +1149,7 @@ class _SettingPageState extends State { Widget _buildBeta() { return ListTile( - title: TipText(text: 'Beta Program', tip: l10n.acceptBeta), + title: TipText('Beta Program', l10n.acceptBeta), trailing: StoreSwitch(prop: _setting.betaTest), ); } @@ -1169,8 +1163,8 @@ class _SettingPageState extends State { // style: UIs.textGrey, // ), title: TipText( - tip: '${l10n.letterCacheTip}\n${l10n.needRestart}', - text: l10n.letterCache, + l10n.letterCache, + '${l10n.letterCacheTip}\n${l10n.needRestart}' ), trailing: StoreSwitch(prop: _setting.letterCache), ); @@ -1181,7 +1175,7 @@ class _SettingPageState extends State { (val) { return ListTile( leading: const Icon(MingCute.edit_fill), - title: TipText(text: l10n.editor, tip: l10n.sftpEditorTip), + title: TipText(l10n.editor, l10n.sftpEditorTip), trailing: Text( val.isEmpty ? l10n.inner : val, style: UIs.text15, diff --git a/lib/view/page/setting/platform/android.dart b/lib/view/page/setting/platform/android.dart index 1c31f86b..3cba2556 100644 --- a/lib/view/page/setting/platform/android.dart +++ b/lib/view/page/setting/platform/android.dart @@ -30,9 +30,7 @@ class _AndroidSettingsPageState extends State { Widget _buildBgRun() { return ListTile( - // title: Text(l10n.bgRun), - // subtitle: Text(l10n.bgRunTip, style: UIs.textGrey), - title: TipText(text: l10n.bgRun, tip: l10n.bgRunTip), + title: TipText(l10n.bgRun, l10n.bgRunTip), trailing: StoreSwitch(prop: Stores.setting.bgRun), ); } diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj index e3b12b8f..ed148a8c 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 = 1048; + CURRENT_PROJECT_VERSION = 1049; 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.1048; + MARKETING_VERSION = 1.0.1049; 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 = 1048; + CURRENT_PROJECT_VERSION = 1049; 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.1048; + MARKETING_VERSION = 1.0.1049; 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 = 1048; + CURRENT_PROJECT_VERSION = 1049; 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.1048; + MARKETING_VERSION = 1.0.1049; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox; PRODUCT_NAME = "Server Box"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/pubspec.lock b/pubspec.lock index 0af98d0f..3ababcf7 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -385,8 +385,8 @@ packages: dependency: "direct main" description: path: "." - ref: "v1.0.114" - resolved-ref: "01f4588bf8b9da701c1b808aa542dd4a05533244" + ref: "v1.0.115" + resolved-ref: "1cf064e7b1e364a3022cae83cf549f6b32f364c5" url: "https://github.com/lppcg/fl_lib" source: git version: "0.0.1" diff --git a/pubspec.yaml b/pubspec.yaml index eaab3212..7517b552 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.1048+1048 +version: 1.0.1049+1049 environment: sdk: ">=3.0.0" @@ -61,7 +61,7 @@ dependencies: fl_lib: git: url: https://github.com/lppcg/fl_lib - ref: v1.0.114 + ref: v1.0.115 dependency_overrides: # dartssh2: