Skip to content

Commit

Permalink
opt.: TipText
Browse files Browse the repository at this point in the history
  • Loading branch information
lollipopkit committed Aug 4, 2024
1 parent e3c8854 commit a15c049
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 72 deletions.
36 changes: 18 additions & 18 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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";
Expand Down Expand Up @@ -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";
Expand All @@ -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";
Expand All @@ -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";
Expand All @@ -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";
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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)";
Expand All @@ -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;
Expand All @@ -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)";
Expand All @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion lib/data/res/build_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
16 changes: 6 additions & 10 deletions lib/intro.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
],
);
}
Expand Down
54 changes: 24 additions & 30 deletions lib/view/page/setting/entry.dart
Original file line number Diff line number Diff line change
Expand Up @@ -444,10 +444,7 @@ class _SettingPageState extends State<SettingPage> {
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(
Expand Down Expand Up @@ -581,10 +578,7 @@ class _SettingPageState extends State<SettingPage> {
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(),
Expand Down Expand Up @@ -665,8 +659,8 @@ class _SettingPageState extends State<SettingPage> {
// 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),
);
Expand Down Expand Up @@ -744,8 +738,8 @@ class _SettingPageState extends State<SettingPage> {
// 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(),
Expand Down Expand Up @@ -797,8 +791,8 @@ class _SettingPageState extends State<SettingPage> {
// 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),
);
Expand Down Expand Up @@ -877,7 +871,7 @@ class _SettingPageState extends State<SettingPage> {
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),
);
}
Expand All @@ -887,8 +881,8 @@ class _SettingPageState extends State<SettingPage> {
// 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),
);
Expand All @@ -915,16 +909,16 @@ class _SettingPageState extends State<SettingPage> {
// 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),
);
}

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),
);
}
Expand All @@ -941,8 +935,8 @@ class _SettingPageState extends State<SettingPage> {
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),
);
Expand All @@ -962,8 +956,8 @@ class _SettingPageState extends State<SettingPage> {
// 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),
);
Expand All @@ -989,8 +983,8 @@ class _SettingPageState extends State<SettingPage> {
// 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),
);
Expand Down Expand Up @@ -1155,7 +1149,7 @@ class _SettingPageState extends State<SettingPage> {

Widget _buildBeta() {
return ListTile(
title: TipText(text: 'Beta Program', tip: l10n.acceptBeta),
title: TipText('Beta Program', l10n.acceptBeta),
trailing: StoreSwitch(prop: _setting.betaTest),
);
}
Expand All @@ -1169,8 +1163,8 @@ class _SettingPageState extends State<SettingPage> {
// 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),
);
Expand All @@ -1181,7 +1175,7 @@ class _SettingPageState extends State<SettingPage> {
(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,
Expand Down
4 changes: 1 addition & 3 deletions lib/view/page/setting/platform/android.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ class _AndroidSettingsPageState extends State<AndroidSettingsPage> {

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),
);
}
Expand Down
Loading

0 comments on commit a15c049

Please sign in to comment.