From 432e3b1824b4921b43a5322fddf75bb0f377411a Mon Sep 17 00:00:00 2001 From: lollipopkit Date: Sat, 5 Aug 2023 14:32:21 +0800 Subject: [PATCH] add: more `contributors` --- ios/Runner.xcodeproj/project.pbxproj | 24 ++-- lib/data/model/app/github_id.dart | 5 + lib/data/res/build_data.dart | 6 +- lib/data/res/misc.dart | 33 +++++ lib/data/res/url.dart | 15 -- lib/view/page/home.dart | 190 ++++++++++++++----------- macos/Runner.xcodeproj/project.pbxproj | 12 +- 7 files changed, 165 insertions(+), 120 deletions(-) create mode 100644 lib/data/model/app/github_id.dart diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index d2c830c7..94cc7341 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -470,7 +470,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 416; + CURRENT_PROJECT_VERSION = 417; DEVELOPMENT_TEAM = BA88US33G6; ENABLE_BITCODE = NO; INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist"; @@ -478,7 +478,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.416; + MARKETING_VERSION = 1.0.417; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -602,7 +602,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 416; + CURRENT_PROJECT_VERSION = 417; DEVELOPMENT_TEAM = BA88US33G6; ENABLE_BITCODE = NO; INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist"; @@ -610,7 +610,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.416; + MARKETING_VERSION = 1.0.417; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -628,7 +628,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 416; + CURRENT_PROJECT_VERSION = 417; DEVELOPMENT_TEAM = BA88US33G6; ENABLE_BITCODE = NO; INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist"; @@ -636,7 +636,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.416; + MARKETING_VERSION = 1.0.417; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -657,7 +657,7 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 416; + CURRENT_PROJECT_VERSION = 417; DEVELOPMENT_TEAM = BA88US33G6; GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; @@ -670,7 +670,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.0.416; + MARKETING_VERSION = 1.0.417; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget; @@ -696,7 +696,7 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 416; + CURRENT_PROJECT_VERSION = 417; DEVELOPMENT_TEAM = BA88US33G6; GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; @@ -709,7 +709,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.0.416; + MARKETING_VERSION = 1.0.417; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -732,7 +732,7 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 416; + CURRENT_PROJECT_VERSION = 417; DEVELOPMENT_TEAM = BA88US33G6; GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; @@ -745,7 +745,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.0.416; + MARKETING_VERSION = 1.0.417; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/lib/data/model/app/github_id.dart b/lib/data/model/app/github_id.dart new file mode 100644 index 00000000..b2f14dcc --- /dev/null +++ b/lib/data/model/app/github_id.dart @@ -0,0 +1,5 @@ +typedef GhId = String; + +extension GhIdX on GhId { + String get url => 'https://github.com/$this '; +} diff --git a/lib/data/res/build_data.dart b/lib/data/res/build_data.dart index d2d5fd1a..fd9b43eb 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 = 416; + static const int build = 417; static const String engine = "3.10.6"; - static const String buildAt = "2023-08-05 12:53:08.311867"; - static const int modifications = 6; + static const String buildAt = "2023-08-05 13:35:14.889342"; + static const int modifications = 3; } diff --git a/lib/data/res/misc.dart b/lib/data/res/misc.dart index 5eef7775..3269127e 100644 --- a/lib/data/res/misc.dart +++ b/lib/data/res/misc.dart @@ -1,5 +1,7 @@ import 'package:flutter/services.dart'; +import '../model/app/github_id.dart'; + /// RegExp for number final numReg = RegExp(r'\s{1,}'); @@ -16,3 +18,34 @@ const maxDebugLogLines = 100; const pkgName = 'tech.lolli.toolbox'; const bgRunChannel = MethodChannel('$pkgName/app_retain'); const homeWidgetChannel = MethodChannel('$pkgName/home_widget'); + +// Thanks +// If you want to change the url, please open an issue. +const contributors = { + 'its-tom', + 'RainSunMe', + 'kalashnikov', + 'azkadev', + 'calvinweb', + 'Liloupar' +}; +const participants = { + 'jaychoubaby', + 'fecture', + 'Tao173', + 'QingAnLe', + 'wxdjs', + 'Aeorq', + 'allonmymind', + 'LittleState', + 'karuboniru', + 'whosphp', + 'Climit', + 'dianso', + 'Jasondeepny', + 'kaliwell', + 'ymxkiss', + 'Ealrang', + 'hange33', + 'yuchen1204', +}; diff --git a/lib/data/res/url.dart b/lib/data/res/url.dart index 82dad39a..a26928c5 100644 --- a/lib/data/res/url.dart +++ b/lib/data/res/url.dart @@ -3,18 +3,3 @@ const baseUrl = '$backendUrl/serverbox'; const joinQQGroupUrl = 'https://jq.qq.com/?_wv=1027&k=G0hUmPAq'; const myGithub = 'https://github.com/lollipopkit'; const appHelpUrl = '$myGithub/flutter_server_box#-help'; - -// Thanks -// If you want to change the url, please open an issue. -const thanksMap = { - 'its-tom': 'https://github.com/its-tom', - 'RainSunMe': 'https://github.com/RainSunMe', - 'fecture': 'https://github.com/fecture', - 'Tao173': 'https://github.com/Tao173', - 'QingAnLe': 'https://github.com/QingAnLe', - 'wxdjs': 'https://github.com/wxdjs', - 'Aeorq': 'https://github.com/Aeorq', - 'jaychoubaby': 'https://github.com/jaychoubaby', - 'allonmymind': 'https://github.com/allonmymind', - 'azkadev': 'https://github.com/azkadev' -}; diff --git a/lib/view/page/home.dart b/lib/view/page/home.dart index 42d14e7d..4b255b4d 100644 --- a/lib/view/page/home.dart +++ b/lib/view/page/home.dart @@ -2,6 +2,7 @@ import 'package:after_layout/after_layout.dart'; import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/l10n.dart'; import 'package:get_it/get_it.dart'; +import 'package:toolbox/data/model/app/github_id.dart'; import 'package:toolbox/data/model/app/tab.dart'; import 'package:toolbox/data/provider/app.dart'; import 'package:toolbox/data/res/misc.dart'; @@ -197,92 +198,113 @@ class _HomePageState extends State ), ), const SizedBox(height: 37), - Padding( - padding: const EdgeInsets.symmetric(horizontal: 17), - child: Column( - children: [ - ListTile( - leading: const Icon(Icons.settings), - title: Text(_s.setting), - onTap: () => AppRoute( - const SettingPage(), - 'Setting', - ).go(context), - ), - ListTile( - leading: const Icon(Icons.vpn_key), - title: Text(_s.privateKey), - onTap: () => AppRoute( - const PrivateKeysListPage(), - 'private key list', - ).go(context), - ), - ListTile( - leading: const Icon(Icons.download), - title: Text(_s.download), - onTap: () => AppRoute( - const LocalStoragePage(), - 'sftp local page', - ).go(context), - ), - ListTile( - leading: const Icon(Icons.import_export), - title: Text(_s.backup), - onTap: () => AppRoute( - BackupPage(), - 'backup page', - ).go(context), - ), - ListTile( - leading: const Icon(Icons.code), - title: Text(_s.convert), - onTap: () => AppRoute( - const ConvertPage(), - 'convert page', - ).go(context), - ), - ListTile( - leading: const Icon(Icons.text_snippet), - title: Text('${_s.about} & ${_s.feedback}'), - onTap: () { - showRoundDialog( - context: context, - title: Text(_s.about), - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - UrlText( - text: _s.madeWithLove(myGithub), - replace: 'lollipopkit'), - UrlText( - text: _s.aboutThanks, - ), - // Thanks - ...thanksMap.keys.map( - (key) => UrlText( - text: thanksMap[key] ?? '', - replace: key, - ), - ) - ], - ), - actions: [ - TextButton( - onPressed: () => openUrl(appHelpUrl), - child: Text(_s.feedback), - ), - TextButton( - onPressed: () => showLicensePage(context: context), - child: Text(_s.license), - ), - ], - ); - }, - ) - ].map((e) => RoundRectCard(e)).toList(), + _buildTiles(), + ], + ), + ); + } + + Widget _buildTiles() { + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 17), + child: Column( + children: [ + ListTile( + leading: const Icon(Icons.settings), + title: Text(_s.setting), + onTap: () => AppRoute( + const SettingPage(), + 'Setting', + ).go(context), + ), + ListTile( + leading: const Icon(Icons.vpn_key), + title: Text(_s.privateKey), + onTap: () => AppRoute( + const PrivateKeysListPage(), + 'private key list', + ).go(context), + ), + ListTile( + leading: const Icon(Icons.download), + title: Text(_s.download), + onTap: () => AppRoute( + const LocalStoragePage(), + 'sftp local page', + ).go(context), + ), + ListTile( + leading: const Icon(Icons.import_export), + title: Text(_s.backup), + onTap: () => AppRoute( + BackupPage(), + 'backup page', + ).go(context), + ), + ListTile( + leading: const Icon(Icons.code), + title: Text(_s.convert), + onTap: () => AppRoute( + const ConvertPage(), + 'convert page', + ).go(context), + ), + ListTile( + leading: const Icon(Icons.text_snippet), + title: Text('${_s.about} & ${_s.feedback}'), + onTap: _showAboutDialog, + ) + ].map((e) => RoundRectCard(e)).toList(), + ), + ); + } + + void _showAboutDialog() { + showRoundDialog( + context: context, + title: Text(_s.about), + child: _buildAboutContent(), + actions: [ + TextButton( + onPressed: () => openUrl(appHelpUrl), + child: Text(_s.feedback), + ), + TextButton( + onPressed: () => showLicensePage(context: context), + child: Text(_s.license), + ), + ], + ); + } + + Widget _buildAboutContent() { + return SingleChildScrollView( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + UrlText( + text: _s.madeWithLove(myGithub), + replace: 'lollipopkit', + ), + height13, + // Use [UrlText] for same text style + Text(_s.aboutThanks), + height13, + const Text('Contributors:'), + ...contributors.map( + (name) => UrlText( + text: name.url, + replace: name, ), ), + const Text('Participants:'), + ...participants.map( + (name) => UrlText( + text: name.url, + replace: name, + ), + ) ], ), ); diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj index 660a8a99..11178d18 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 = 416; + CURRENT_PROJECT_VERSION = 417; GENERATE_INFOPLIST_FILE = YES; - MARKETING_VERSION = 1.0.416; + MARKETING_VERSION = 1.0.417; 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 = 416; + CURRENT_PROJECT_VERSION = 417; GENERATE_INFOPLIST_FILE = YES; - MARKETING_VERSION = 1.0.416; + MARKETING_VERSION = 1.0.417; 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 = 416; + CURRENT_PROJECT_VERSION = 417; GENERATE_INFOPLIST_FILE = YES; - MARKETING_VERSION = 1.0.416; + MARKETING_VERSION = 1.0.417; PRODUCT_BUNDLE_IDENTIFIER = tech.lolli.serverBox.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0;