From d7c0be045ad49dcb5d1ecce2166a2f1af127235a Mon Sep 17 00:00:00 2001 From: lollipopkit Date: Sat, 13 May 2023 19:40:18 +0800 Subject: [PATCH] opt. UI --- ios/Podfile.lock | 51 ++-------------------------- ios/Runner.xcodeproj/project.pbxproj | 12 +++---- lib/data/res/build_data.dart | 6 ++-- lib/data/res/ui.dart | 3 +- lib/view/page/setting.dart | 17 +++++++--- lib/view/page/ssh.dart | 41 +++++++++++----------- 6 files changed, 47 insertions(+), 83 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index bbd90cc7..e6b876d4 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1,39 +1,7 @@ PODS: - countly_flutter (22.09.0): - Flutter - - DKImagePickerController/Core (4.3.4): - - DKImagePickerController/ImageDataManager - - DKImagePickerController/Resource - - DKImagePickerController/ImageDataManager (4.3.4) - - DKImagePickerController/PhotoGallery (4.3.4): - - DKImagePickerController/Core - - DKPhotoGallery - - DKImagePickerController/Resource (4.3.4) - - DKPhotoGallery (0.0.17): - - DKPhotoGallery/Core (= 0.0.17) - - DKPhotoGallery/Model (= 0.0.17) - - DKPhotoGallery/Preview (= 0.0.17) - - DKPhotoGallery/Resource (= 0.0.17) - - SDWebImage - - SwiftyGif - - DKPhotoGallery/Core (0.0.17): - - DKPhotoGallery/Model - - DKPhotoGallery/Preview - - SDWebImage - - SwiftyGif - - DKPhotoGallery/Model (0.0.17): - - SDWebImage - - SwiftyGif - - DKPhotoGallery/Preview (0.0.17): - - DKPhotoGallery/Model - - DKPhotoGallery/Resource - - SDWebImage - - SwiftyGif - - DKPhotoGallery/Resource (0.0.17): - - SDWebImage - - SwiftyGif - file_picker (0.0.1): - - DKImagePickerController/PhotoGallery - Flutter - Flutter (1.0.0) - flutter_native_splash (0.0.1): @@ -45,12 +13,8 @@ PODS: - Flutter - r_upgrade (0.0.1): - Flutter - - SDWebImage (5.15.7): - - SDWebImage/Core (= 5.15.7) - - SDWebImage/Core (5.15.7) - share_plus (0.0.1): - Flutter - - SwiftyGif (5.4.4) - url_launcher_ios (0.0.1): - Flutter @@ -65,13 +29,6 @@ DEPENDENCIES: - share_plus (from `.symlinks/plugins/share_plus/ios`) - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) -SPEC REPOS: - trunk: - - DKImagePickerController - - DKPhotoGallery - - SDWebImage - - SwiftyGif - EXTERNAL SOURCES: countly_flutter: :path: ".symlinks/plugins/countly_flutter/ios" @@ -94,19 +51,15 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: countly_flutter: 135f1a4930f8e26ba223a14201d3f265ea7b4c83 - DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac - DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179 - file_picker: 63d7a9f5a3b5fe8fa001b1af955065e42a6c7b3e + file_picker: 1d63c4949e05e386da864365f8c13e1e64787675 Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef path_provider_foundation: c68054786f1b4f3343858c1e1d0caaded73f0be9 plain_notification_token: b36467dc91939a7b6754267c701bbaca14996ee1 r_upgrade: 44d715c61914cce3d01ea225abffe894fd51c114 - SDWebImage: 25bac438318faf37e35650619ebc288a9061d292 share_plus: 056a1e8ac890df3e33cb503afffaf1e9b4fbae68 - SwiftyGif: 93a1cc87bf3a51916001cf8f3d63835fb64c819f url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4 -PODFILE CHECKSUM: 8fb0b88ad9ca0fa16f109f46126189158d7c8607 +PODFILE CHECKSUM: 7fb15c416f8685fca4966867a8da218ec592ec2e COCOAPODS: 1.12.1 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index a3500791..9fd5d521 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 = 300; + CURRENT_PROJECT_VERSION = 306; DEVELOPMENT_TEAM = BA88US33G6; ENABLE_BITCODE = NO; INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist"; @@ -368,7 +368,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.300; + MARKETING_VERSION = 1.0.306; 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 = 300; + CURRENT_PROJECT_VERSION = 306; DEVELOPMENT_TEAM = BA88US33G6; ENABLE_BITCODE = NO; INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist"; @@ -499,7 +499,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.300; + MARKETING_VERSION = 1.0.306; 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 = 300; + CURRENT_PROJECT_VERSION = 306; DEVELOPMENT_TEAM = BA88US33G6; ENABLE_BITCODE = NO; INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist"; @@ -524,7 +524,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.300; + MARKETING_VERSION = 1.0.306; PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; diff --git a/lib/data/res/build_data.dart b/lib/data/res/build_data.dart index dc9bb754..24aeaa28 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 = 300; + static const int build = 306; static const String engine = "3.10.0"; - static const String buildAt = "2023-05-12 16:42:47.988995"; - static const int modifications = 1; + static const String buildAt = "2023-05-12 22:39:42.911728"; + static const int modifications = 5; } diff --git a/lib/data/res/ui.dart b/lib/data/res/ui.dart index eaf40c8c..3a2849ac 100644 --- a/lib/data/res/ui.dart +++ b/lib/data/res/ui.dart @@ -2,10 +2,11 @@ import 'package:flutter/material.dart'; /// Font style -const textSize18 = TextStyle(fontSize: 18); const textSize11 = TextStyle(fontSize: 11); const textSize13 = TextStyle(fontSize: 13); const textSize13Grey = TextStyle(color: Colors.grey, fontSize: 13); +const textSize15 = TextStyle(fontSize: 15); +const textSize18 = TextStyle(fontSize: 18); const textSize27 = TextStyle(fontSize: 27); const grey = TextStyle(color: Colors.grey); diff --git a/lib/view/page/setting.dart b/lib/view/page/setting.dart index a430a246..d7fe16ba 100644 --- a/lib/view/page/setting.dart +++ b/lib/view/page/setting.dart @@ -21,7 +21,6 @@ import '../../data/res/ui.dart'; import '../../data/store/setting.dart'; import '../../locator.dart'; import '../widget/future_widget.dart'; -import '../widget/popup_menu.dart'; import '../widget/round_rect_card.dart'; class SettingPage extends StatefulWidget { @@ -205,7 +204,7 @@ class _SettingPageState extends State { }, trailing: PopupMenuButton( key: updateIntervalKey, - itemBuilder: (BuildContext context) => items, + itemBuilder: (_) => items, initialValue: _updateInterval, onSelected: (int val) { setState(() { @@ -219,6 +218,7 @@ class _SettingPageState extends State { }, child: Text( '${_updateInterval.toInt()} ${_s.second}', + style: textSize15, ), ), ); @@ -294,6 +294,7 @@ class _SettingPageState extends State { child: Text( tabTitleName(context, _launchPageIdx), textAlign: TextAlign.right, + style: textSize15, ), ), ), @@ -328,6 +329,7 @@ class _SettingPageState extends State { }, child: Text( TerminalColorsPlatform.values[_termThemeIdx].name, + style: textSize15, ), ), ); @@ -366,6 +368,7 @@ class _SettingPageState extends State { }, child: Text( '${_maxRetryCount.toInt()} ${_s.times}', + style: textSize15, ), ), ); @@ -399,7 +402,10 @@ class _SettingPageState extends State { }); _setting.themeMode.put(_nightMode); }, - child: Text(_buildThemeModeStr(_nightMode)), + child: Text( + _buildThemeModeStr(_nightMode), + style: textSize15, + ), ), ); } @@ -455,7 +461,10 @@ class _SettingPageState extends State { final fontName = getFileName(_setting.fontPath.fetch()); return ListTile( title: Text(_s.choose), - trailing: Text(fontName ?? _s.notSelected), + trailing: Text( + fontName ?? _s.notSelected, + style: textSize15, + ), onTap: () { showRoundDialog( context: context, diff --git a/lib/view/page/ssh.dart b/lib/view/page/ssh.dart index 0e3b30b1..5a56b901 100644 --- a/lib/view/page/ssh.dart +++ b/lib/view/page/ssh.dart @@ -54,8 +54,9 @@ class _SSHPageState extends State { super.initState(); final termColorIdx = _setting.termColorIdx.fetch()!; _termColors = TerminalColorsPlatform.values[termColorIdx].colors; - final ts = TextStyle(fontFamily: getFileName(_setting.fontPath.fetch())); - _terminalStyle = TerminalStyle.fromTextStyle(ts); + final fontFamilly = getFileName(_setting.fontPath.fetch()); + final textStyle = TextStyle(fontFamily: fontFamilly); + _terminalStyle = TerminalStyle.fromTextStyle(textStyle); initTerminal(); } @@ -259,28 +260,28 @@ class _SSHPageState extends State { } final selected = terminalSelected; final children = [ - TextButton( - onPressed: () { - _paste(); - }, - child: Text(_s.paste), - ), + TextButton( + onPressed: () { + _paste(); + }, + child: Text(_s.paste), + ), ]; if (selected?.trim().isNotEmpty ?? false) { children.add( - TextButton( - child: Text( - _s.copy, - style: _menuTextStyle, + TextButton( + child: Text( + _s.copy, + style: _menuTextStyle, + ), + onPressed: () { + _terminalController.setSelection(null); + if (selected != null) { + copy2Clipboard(selected); + } + _menuController.remove(); + }, ), - onPressed: () { - _terminalController.setSelection(null); - if (selected != null) { - copy2Clipboard(selected); - } - _menuController.remove(); - }, - ), ); } _menuController.show(