mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
opt.: settings
This commit is contained in:
@@ -1349,7 +1349,7 @@ abstract class S {
|
|||||||
/// No description provided for @versionUnknownUpdate.
|
/// No description provided for @versionUnknownUpdate.
|
||||||
///
|
///
|
||||||
/// In en, this message translates to:
|
/// In en, this message translates to:
|
||||||
/// **'Current: v1.0.{build}'**
|
/// **'Current: v1.0.{build}, click to check updates'**
|
||||||
String versionUnknownUpdate(Object build);
|
String versionUnknownUpdate(Object build);
|
||||||
|
|
||||||
/// No description provided for @versionUpdated.
|
/// No description provided for @versionUpdated.
|
||||||
|
|||||||
@@ -672,7 +672,7 @@ class SDe extends S {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
String versionUnknownUpdate(Object build) {
|
String versionUnknownUpdate(Object build) {
|
||||||
return 'Aktuell: v1.0.$build';
|
return 'Aktuell: v1.0.$build. Klicken Sie hier, um nach Updates zu suchen';
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
@@ -672,7 +672,7 @@ class SEn extends S {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
String versionUnknownUpdate(Object build) {
|
String versionUnknownUpdate(Object build) {
|
||||||
return 'Current: v1.0.$build';
|
return 'Current: v1.0.$build, click to check updates';
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
@@ -672,7 +672,7 @@ class SId extends S {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
String versionUnknownUpdate(Object build) {
|
String versionUnknownUpdate(Object build) {
|
||||||
return 'Saat ini: v1.0.$build';
|
return 'Saat ini: v1.0.$build. Klik untuk memeriksa pembaruan.';
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
@@ -672,7 +672,7 @@ class SZh extends S {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
String versionUnknownUpdate(Object build) {
|
String versionUnknownUpdate(Object build) {
|
||||||
return '当前:v1.0.$build';
|
return '当前:v1.0.$build,点击检查更新';
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -1371,7 +1371,7 @@ class SZhTw extends SZh {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
String versionUnknownUpdate(Object build) {
|
String versionUnknownUpdate(Object build) {
|
||||||
return '當前:v1.0.$build';
|
return '當前:v1.0.$build,點擊檢查更新';
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
@@ -470,7 +470,7 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CURRENT_PROJECT_VERSION = 472;
|
CURRENT_PROJECT_VERSION = 473;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
||||||
@@ -478,7 +478,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.472;
|
MARKETING_VERSION = 1.0.473;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
@@ -602,7 +602,7 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CURRENT_PROJECT_VERSION = 472;
|
CURRENT_PROJECT_VERSION = 473;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
||||||
@@ -610,7 +610,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.472;
|
MARKETING_VERSION = 1.0.473;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
@@ -628,7 +628,7 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CURRENT_PROJECT_VERSION = 472;
|
CURRENT_PROJECT_VERSION = 473;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
||||||
@@ -636,7 +636,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.472;
|
MARKETING_VERSION = 1.0.473;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
@@ -657,7 +657,7 @@
|
|||||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 472;
|
CURRENT_PROJECT_VERSION = 473;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
@@ -670,7 +670,7 @@
|
|||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
"@executable_path/../../Frameworks",
|
"@executable_path/../../Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.472;
|
MARKETING_VERSION = 1.0.473;
|
||||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||||
MTL_FAST_MATH = YES;
|
MTL_FAST_MATH = YES;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget;
|
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget;
|
||||||
@@ -696,7 +696,7 @@
|
|||||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 472;
|
CURRENT_PROJECT_VERSION = 473;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
@@ -709,7 +709,7 @@
|
|||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
"@executable_path/../../Frameworks",
|
"@executable_path/../../Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.472;
|
MARKETING_VERSION = 1.0.473;
|
||||||
MTL_FAST_MATH = YES;
|
MTL_FAST_MATH = YES;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget;
|
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
@@ -732,7 +732,7 @@
|
|||||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 472;
|
CURRENT_PROJECT_VERSION = 473;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
@@ -745,7 +745,7 @@
|
|||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
"@executable_path/../../Frameworks",
|
"@executable_path/../../Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.472;
|
MARKETING_VERSION = 1.0.473;
|
||||||
MTL_FAST_MATH = YES;
|
MTL_FAST_MATH = YES;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget;
|
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
|||||||
@@ -8,6 +8,13 @@ const _interactiveStates = <MaterialState>{
|
|||||||
};
|
};
|
||||||
|
|
||||||
extension ColorX on Color {
|
extension ColorX on Color {
|
||||||
|
String get toHex {
|
||||||
|
final redStr = red.toRadixString(16).padLeft(2, '0');
|
||||||
|
final greenStr = green.toRadixString(16).padLeft(2, '0');
|
||||||
|
final blueStr = blue.toRadixString(16).padLeft(2, '0');
|
||||||
|
return '#$redStr$greenStr$blueStr';
|
||||||
|
}
|
||||||
|
|
||||||
bool get isBrightColor {
|
bool get isBrightColor {
|
||||||
return getBrightnessFromColor == Brightness.light;
|
return getBrightnessFromColor == Brightness.light;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,16 @@ import 'package:flutter/foundation.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
extension StringX on String {
|
extension StringX on String {
|
||||||
|
/// Format: `#8b2252` or `8b2252`
|
||||||
|
Color? get hexToColor {
|
||||||
|
final hexCode = replaceAll('#', '');
|
||||||
|
final val = int.tryParse('FF$hexCode', radix: 16);
|
||||||
|
if (val == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return Color(val);
|
||||||
|
}
|
||||||
|
|
||||||
int get i => int.parse(this);
|
int get i => int.parse(this);
|
||||||
|
|
||||||
Uri get uri {
|
Uri get uri {
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
class BuildData {
|
class BuildData {
|
||||||
static const String name = "ServerBox";
|
static const String name = "ServerBox";
|
||||||
static const int build = 472;
|
static const int build = 473;
|
||||||
static const String engine = "3.10.6";
|
static const String engine = "3.10.6";
|
||||||
static const String buildAt = "2023-08-14 11:11:21.335805";
|
static const String buildAt = "2023-08-15 23:06:31.430481";
|
||||||
static const int modifications = 2;
|
static const int modifications = 2;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -208,7 +208,7 @@
|
|||||||
"urlOrJson": "URL oder JSON",
|
"urlOrJson": "URL oder JSON",
|
||||||
"user": "Benutzer",
|
"user": "Benutzer",
|
||||||
"versionHaveUpdate": "Gefunden: v1.0.{build}, klicke zum Aktualisieren",
|
"versionHaveUpdate": "Gefunden: v1.0.{build}, klicke zum Aktualisieren",
|
||||||
"versionUnknownUpdate": "Aktuell: v1.0.{build}",
|
"versionUnknownUpdate": "Aktuell: v1.0.{build}. Klicken Sie hier, um nach Updates zu suchen",
|
||||||
"versionUpdated": "v1.0.{build} ist bereits die neueste Version",
|
"versionUpdated": "v1.0.{build} ist bereits die neueste Version",
|
||||||
"viewErr": "Fehler anzeigen",
|
"viewErr": "Fehler anzeigen",
|
||||||
"virtKeyHelpClipboard": "In die Zwischenablage kopieren, wenn das ausgewählte Terminal nicht leer ist, andernfalls den Inhalt der Zwischenablage in das Terminal einfügen.",
|
"virtKeyHelpClipboard": "In die Zwischenablage kopieren, wenn das ausgewählte Terminal nicht leer ist, andernfalls den Inhalt der Zwischenablage in das Terminal einfügen.",
|
||||||
|
|||||||
@@ -208,7 +208,7 @@
|
|||||||
"urlOrJson": "URL or JSON",
|
"urlOrJson": "URL or JSON",
|
||||||
"user": "User",
|
"user": "User",
|
||||||
"versionHaveUpdate": "Found: v1.0.{build}, click to update",
|
"versionHaveUpdate": "Found: v1.0.{build}, click to update",
|
||||||
"versionUnknownUpdate": "Current: v1.0.{build}",
|
"versionUnknownUpdate": "Current: v1.0.{build}, click to check updates",
|
||||||
"versionUpdated": "Current: v1.0.{build}, is up to date",
|
"versionUpdated": "Current: v1.0.{build}, is up to date",
|
||||||
"viewErr": "See error",
|
"viewErr": "See error",
|
||||||
"virtKeyHelpClipboard": "Copy to the clipboard if terminal selected is not empty, otherwise paste the contents of the clipboard to the terminal.",
|
"virtKeyHelpClipboard": "Copy to the clipboard if terminal selected is not empty, otherwise paste the contents of the clipboard to the terminal.",
|
||||||
|
|||||||
@@ -208,7 +208,7 @@
|
|||||||
"urlOrJson": "URL atau JSON",
|
"urlOrJson": "URL atau JSON",
|
||||||
"user": "Username",
|
"user": "Username",
|
||||||
"versionHaveUpdate": "Ditemukan: v1.0.{build}, klik untuk memperbarui",
|
"versionHaveUpdate": "Ditemukan: v1.0.{build}, klik untuk memperbarui",
|
||||||
"versionUnknownUpdate": "Saat ini: v1.0.{build}",
|
"versionUnknownUpdate": "Saat ini: v1.0.{build}. Klik untuk memeriksa pembaruan.",
|
||||||
"versionUpdated": "Saat ini: v1.0.{build}, mutakhir",
|
"versionUpdated": "Saat ini: v1.0.{build}, mutakhir",
|
||||||
"viewErr": "Lihat kesalahan",
|
"viewErr": "Lihat kesalahan",
|
||||||
"virtKeyHelpClipboard": "Salin ke clipboard jika terminal yang dipilih tidak kosong, jika tidak, tempel isi clipboard ke terminal.",
|
"virtKeyHelpClipboard": "Salin ke clipboard jika terminal yang dipilih tidak kosong, jika tidak, tempel isi clipboard ke terminal.",
|
||||||
|
|||||||
@@ -208,7 +208,7 @@
|
|||||||
"urlOrJson": "链接或JSON",
|
"urlOrJson": "链接或JSON",
|
||||||
"user": "用户",
|
"user": "用户",
|
||||||
"versionHaveUpdate": "找到新版本:v1.0.{build}, 点击更新",
|
"versionHaveUpdate": "找到新版本:v1.0.{build}, 点击更新",
|
||||||
"versionUnknownUpdate": "当前:v1.0.{build}",
|
"versionUnknownUpdate": "当前:v1.0.{build},点击检查更新",
|
||||||
"versionUpdated": "当前:v1.0.{build}, 已是最新版本",
|
"versionUpdated": "当前:v1.0.{build}, 已是最新版本",
|
||||||
"viewErr": "查看错误",
|
"viewErr": "查看错误",
|
||||||
"virtKeyHelpClipboard": "如果终端有选中字符,则复制选中字符至剪切板,否则粘贴剪切板内容至终端。",
|
"virtKeyHelpClipboard": "如果终端有选中字符,则复制选中字符至剪切板,否则粘贴剪切板内容至终端。",
|
||||||
|
|||||||
@@ -208,7 +208,7 @@
|
|||||||
"urlOrJson": "鏈接或JSON",
|
"urlOrJson": "鏈接或JSON",
|
||||||
"user": "用戶",
|
"user": "用戶",
|
||||||
"versionHaveUpdate": "找到新版本:v1.0.{build}, 點擊更新",
|
"versionHaveUpdate": "找到新版本:v1.0.{build}, 點擊更新",
|
||||||
"versionUnknownUpdate": "當前:v1.0.{build}",
|
"versionUnknownUpdate": "當前:v1.0.{build},點擊檢查更新",
|
||||||
"versionUpdated": "當前:v1.0.{build}, 已是最新版本",
|
"versionUpdated": "當前:v1.0.{build}, 已是最新版本",
|
||||||
"viewErr": "查看錯誤",
|
"viewErr": "查看錯誤",
|
||||||
"virtKeyHelpClipboard": "如果終端有選中字符,則復製選中字符至剪切板,否則粘貼剪切板內容至終端。",
|
"virtKeyHelpClipboard": "如果終端有選中字符,則復製選中字符至剪切板,否則粘貼剪切板內容至終端。",
|
||||||
|
|||||||
@@ -372,7 +372,7 @@ class _ServerDetailPageState extends State<ServerDetailPage>
|
|||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: width / 1.2,
|
width: width,
|
||||||
child: Text(
|
child: Text(
|
||||||
device,
|
device,
|
||||||
style: textSize11,
|
style: textSize11,
|
||||||
@@ -440,7 +440,7 @@ class _ServerDetailPageState extends State<ServerDetailPage>
|
|||||||
return RoundRectCard(Padding(
|
return RoundRectCard(Padding(
|
||||||
padding: roundRectCardPadding,
|
padding: roundRectCardPadding,
|
||||||
child: Column(children: children),
|
child: Column(children: children),
|
||||||
));
|
),);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildAnimatedText(Key key, String text, TextStyle style) {
|
Widget _buildAnimatedText(Key key, String text, TextStyle style) {
|
||||||
|
|||||||
@@ -4,14 +4,14 @@ import 'dart:io';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||||
import 'package:flutter_highlight/theme_map.dart';
|
import 'package:flutter_highlight/theme_map.dart';
|
||||||
import 'package:flutter_material_color_picker/flutter_material_color_picker.dart';
|
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
|
import 'package:toolbox/core/extension/colorx.dart';
|
||||||
import 'package:toolbox/core/extension/locale.dart';
|
import 'package:toolbox/core/extension/locale.dart';
|
||||||
import 'package:toolbox/core/extension/navigator.dart';
|
import 'package:toolbox/core/extension/navigator.dart';
|
||||||
|
import 'package:toolbox/core/extension/stringx.dart';
|
||||||
import 'package:toolbox/core/route.dart';
|
import 'package:toolbox/core/route.dart';
|
||||||
import 'package:toolbox/data/model/app/net_view.dart';
|
import 'package:toolbox/data/model/app/net_view.dart';
|
||||||
import 'package:toolbox/data/model/app/tab.dart';
|
|
||||||
import 'package:toolbox/view/page/ssh/virt_key_setting.dart';
|
import 'package:toolbox/view/page/ssh/virt_key_setting.dart';
|
||||||
import 'package:toolbox/view/widget/input_field.dart';
|
import 'package:toolbox/view/widget/input_field.dart';
|
||||||
import 'package:toolbox/view/widget/value_notifier.dart';
|
import 'package:toolbox/view/widget/value_notifier.dart';
|
||||||
@@ -41,7 +41,7 @@ class SettingPage extends StatefulWidget {
|
|||||||
|
|
||||||
class _SettingPageState extends State<SettingPage> {
|
class _SettingPageState extends State<SettingPage> {
|
||||||
final _themeKey = GlobalKey<PopupMenuButtonState<int>>();
|
final _themeKey = GlobalKey<PopupMenuButtonState<int>>();
|
||||||
final _startPageKey = GlobalKey<PopupMenuButtonState<int>>();
|
//final _startPageKey = GlobalKey<PopupMenuButtonState<int>>();
|
||||||
final _updateIntervalKey = GlobalKey<PopupMenuButtonState<int>>();
|
final _updateIntervalKey = GlobalKey<PopupMenuButtonState<int>>();
|
||||||
final _maxRetryKey = GlobalKey<PopupMenuButtonState<int>>();
|
final _maxRetryKey = GlobalKey<PopupMenuButtonState<int>>();
|
||||||
final _localeKey = GlobalKey<PopupMenuButtonState<String>>();
|
final _localeKey = GlobalKey<PopupMenuButtonState<String>>();
|
||||||
@@ -53,7 +53,6 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
|
|
||||||
late final SettingStore _setting;
|
late final SettingStore _setting;
|
||||||
late final ServerProvider _serverProvider;
|
late final ServerProvider _serverProvider;
|
||||||
late MediaQueryData _media;
|
|
||||||
late S _s;
|
late S _s;
|
||||||
late SharedPreferences _sp;
|
late SharedPreferences _sp;
|
||||||
|
|
||||||
@@ -75,7 +74,6 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
@override
|
@override
|
||||||
void didChangeDependencies() {
|
void didChangeDependencies() {
|
||||||
super.didChangeDependencies();
|
super.didChangeDependencies();
|
||||||
_media = MediaQuery.of(context);
|
|
||||||
_s = S.of(context)!;
|
_s = S.of(context)!;
|
||||||
_localeCode.value = _setting.locale.fetch() ?? _s.localeName;
|
_localeCode.value = _setting.locale.fetch() ?? _s.localeName;
|
||||||
}
|
}
|
||||||
@@ -141,8 +139,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
_buildLocale(),
|
_buildLocale(),
|
||||||
_buildThemeMode(),
|
_buildThemeMode(),
|
||||||
_buildAppColor(),
|
_buildAppColor(),
|
||||||
_buildLaunchPage(),
|
//_buildLaunchPage(),
|
||||||
_buildAutoCheckAppUpdate(),
|
|
||||||
_buildCheckUpdate(),
|
_buildCheckUpdate(),
|
||||||
];
|
];
|
||||||
if (isIOS) {
|
if (isIOS) {
|
||||||
@@ -215,11 +212,10 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
display = _s.versionUnknownUpdate(BuildData.build);
|
display = _s.versionUnknownUpdate(BuildData.build);
|
||||||
}
|
}
|
||||||
return ListTile(
|
return ListTile(
|
||||||
trailing: const Icon(Icons.keyboard_arrow_right),
|
title: Text(_s.autoCheckUpdate),
|
||||||
title: Text(
|
subtitle: Text(display, style: grey),
|
||||||
display,
|
|
||||||
),
|
|
||||||
onTap: () => doUpdate(ctx, force: true),
|
onTap: () => doUpdate(ctx, force: true),
|
||||||
|
trailing: buildSwitch(context, _setting.autoCheckAppUpdate),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
@@ -282,76 +278,72 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
_s.primaryColor,
|
_s.primaryColor,
|
||||||
),
|
),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
|
final ctrl = TextEditingController(text: primaryColor.toHex);
|
||||||
await showRoundDialog(
|
await showRoundDialog(
|
||||||
context: context,
|
context: context,
|
||||||
title: Text(_s.primaryColor),
|
title: Text(_s.primaryColor),
|
||||||
child: SizedBox(
|
child: Input(
|
||||||
height: 211,
|
onSubmitted: _onSaveColor,
|
||||||
child: Center(
|
controller: ctrl,
|
||||||
child: MaterialColorPicker(
|
hint: '#8b2252',
|
||||||
shrinkWrap: true,
|
icon: Icons.colorize,
|
||||||
allowShades: true,
|
),
|
||||||
onColorChange: (color) {
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _onSaveColor(String s) {
|
||||||
|
final color = s.hexToColor;
|
||||||
|
if (color == null) {
|
||||||
|
showSnackBar(context, Text(_s.failed));
|
||||||
|
return;
|
||||||
|
}
|
||||||
_selectedColorValue.value = color.value;
|
_selectedColorValue.value = color.value;
|
||||||
},
|
|
||||||
selectedColor: primaryColor,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
actions: [
|
|
||||||
TextButton(
|
|
||||||
onPressed: () {
|
|
||||||
_setting.primaryColor.put(_selectedColorValue.value);
|
_setting.primaryColor.put(_selectedColorValue.value);
|
||||||
Navigator.pop(context);
|
context.pop();
|
||||||
_showRestartSnackbar();
|
_showRestartSnackbar();
|
||||||
},
|
|
||||||
child: Text(_s.ok),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildLaunchPage() {
|
// Widget _buildLaunchPage() {
|
||||||
final items = AppTab.values
|
// final items = AppTab.values
|
||||||
.map(
|
// .map(
|
||||||
(e) => PopupMenuItem(
|
// (e) => PopupMenuItem(
|
||||||
value: e.index,
|
// value: e.index,
|
||||||
child: Text(tabTitleName(context, e)),
|
// child: Text(tabTitleName(context, e)),
|
||||||
),
|
// ),
|
||||||
)
|
// )
|
||||||
.toList();
|
// .toList();
|
||||||
|
|
||||||
return ListTile(
|
// return ListTile(
|
||||||
title: Text(
|
// title: Text(
|
||||||
_s.launchPage,
|
// _s.launchPage,
|
||||||
),
|
// ),
|
||||||
onTap: () {
|
// onTap: () {
|
||||||
_startPageKey.currentState?.showButtonMenu();
|
// _startPageKey.currentState?.showButtonMenu();
|
||||||
},
|
// },
|
||||||
trailing: ValueBuilder(
|
// trailing: ValueBuilder(
|
||||||
listenable: _launchPageIdx,
|
// listenable: _launchPageIdx,
|
||||||
build: () => PopupMenuButton(
|
// build: () => PopupMenuButton(
|
||||||
key: _startPageKey,
|
// key: _startPageKey,
|
||||||
itemBuilder: (BuildContext context) => items,
|
// itemBuilder: (BuildContext context) => items,
|
||||||
initialValue: _launchPageIdx.value,
|
// initialValue: _launchPageIdx.value,
|
||||||
onSelected: (int idx) {
|
// onSelected: (int idx) {
|
||||||
_launchPageIdx.value = idx;
|
// _launchPageIdx.value = idx;
|
||||||
_setting.launchPage.put(_launchPageIdx.value);
|
// _setting.launchPage.put(_launchPageIdx.value);
|
||||||
},
|
// },
|
||||||
child: ConstrainedBox(
|
// child: ConstrainedBox(
|
||||||
constraints: BoxConstraints(maxWidth: _media.size.width * 0.35),
|
// constraints: BoxConstraints(maxWidth: _media.size.width * 0.35),
|
||||||
child: Text(
|
// child: Text(
|
||||||
tabTitleName(context, AppTab.values[_launchPageIdx.value]),
|
// tabTitleName(context, AppTab.values[_launchPageIdx.value]),
|
||||||
textAlign: TextAlign.right,
|
// textAlign: TextAlign.right,
|
||||||
style: textSize15,
|
// style: textSize15,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
|
|
||||||
Widget _buildMaxRetry() {
|
Widget _buildMaxRetry() {
|
||||||
final items = List.generate(
|
final items = List.generate(
|
||||||
@@ -978,12 +970,4 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildAutoCheckAppUpdate() {
|
|
||||||
return ListTile(
|
|
||||||
title: Text(_s.autoCheckUpdate),
|
|
||||||
subtitle: Text(_s.whenOpenApp, style: grey),
|
|
||||||
trailing: buildSwitch(context, _setting.autoCheckAppUpdate),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -475,9 +475,9 @@
|
|||||||
baseConfigurationReference = C1C758C41C4E208965A68933 /* Pods-RunnerTests.debug.xcconfig */;
|
baseConfigurationReference = C1C758C41C4E208965A68933 /* Pods-RunnerTests.debug.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
CURRENT_PROJECT_VERSION = 472;
|
CURRENT_PROJECT_VERSION = 473;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
MARKETING_VERSION = 1.0.472;
|
MARKETING_VERSION = 1.0.473;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = tech.lolli.serverBox.RunnerTests;
|
PRODUCT_BUNDLE_IDENTIFIER = tech.lolli.serverBox.RunnerTests;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
@@ -490,9 +490,9 @@
|
|||||||
baseConfigurationReference = 15AF97DF993E8968098D6EBE /* Pods-RunnerTests.release.xcconfig */;
|
baseConfigurationReference = 15AF97DF993E8968098D6EBE /* Pods-RunnerTests.release.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
CURRENT_PROJECT_VERSION = 472;
|
CURRENT_PROJECT_VERSION = 473;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
MARKETING_VERSION = 1.0.472;
|
MARKETING_VERSION = 1.0.473;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = tech.lolli.serverBox.RunnerTests;
|
PRODUCT_BUNDLE_IDENTIFIER = tech.lolli.serverBox.RunnerTests;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
@@ -505,9 +505,9 @@
|
|||||||
baseConfigurationReference = 7CFA7DE7FABA75685DFB6948 /* Pods-RunnerTests.profile.xcconfig */;
|
baseConfigurationReference = 7CFA7DE7FABA75685DFB6948 /* Pods-RunnerTests.profile.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
CURRENT_PROJECT_VERSION = 472;
|
CURRENT_PROJECT_VERSION = 473;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
MARKETING_VERSION = 1.0.472;
|
MARKETING_VERSION = 1.0.473;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = tech.lolli.serverBox.RunnerTests;
|
PRODUCT_BUNDLE_IDENTIFIER = tech.lolli.serverBox.RunnerTests;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
|
|||||||
18
pubspec.lock
18
pubspec.lock
@@ -332,14 +332,6 @@ packages:
|
|||||||
description: flutter
|
description: flutter
|
||||||
source: sdk
|
source: sdk
|
||||||
version: "0.0.0"
|
version: "0.0.0"
|
||||||
flutter_material_color_picker:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: flutter_material_color_picker
|
|
||||||
sha256: ca1e7749d228c9155ea24bce98e647cdbffa350e6f334f6c001f841cd3d9c987
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "1.2.0"
|
|
||||||
flutter_native_splash:
|
flutter_native_splash:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
@@ -1046,11 +1038,9 @@ packages:
|
|||||||
xterm:
|
xterm:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
path: "."
|
path: "../xterm.dart"
|
||||||
ref: master
|
relative: true
|
||||||
resolved-ref: "132bbb310c6026ba1f5f2ef4eac81f874ee06774"
|
source: path
|
||||||
url: "https://github.com/lollipopkit/xterm.dart"
|
|
||||||
source: git
|
|
||||||
version: "3.6.1-pre"
|
version: "3.6.1-pre"
|
||||||
yaml:
|
yaml:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
@@ -1069,5 +1059,5 @@ packages:
|
|||||||
source: hosted
|
source: hosted
|
||||||
version: "0.0.6"
|
version: "0.0.6"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=3.0.2 <4.0.0"
|
dart: ">=3.0.0 <4.0.0"
|
||||||
flutter: ">=3.10.0"
|
flutter: ">=3.10.0"
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ dependencies:
|
|||||||
countly_flutter: ^23.6.0
|
countly_flutter: ^23.6.0
|
||||||
dartssh2: ^2.8.2
|
dartssh2: ^2.8.2
|
||||||
logging: ^1.0.2
|
logging: ^1.0.2
|
||||||
flutter_material_color_picker: ^1.1.0+2
|
|
||||||
circle_chart:
|
circle_chart:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/lollipopkit/circle_chart
|
url: https://github.com/lollipopkit/circle_chart
|
||||||
@@ -55,10 +54,10 @@ dependencies:
|
|||||||
intl: ^0.18.0
|
intl: ^0.18.0
|
||||||
# xterm: ^3.5.0
|
# xterm: ^3.5.0
|
||||||
xterm:
|
xterm:
|
||||||
#path: ../xterm.dart
|
path: ../xterm.dart
|
||||||
git:
|
# git:
|
||||||
ref: master
|
# ref: master
|
||||||
url: https://github.com/lollipopkit/xterm.dart
|
# url: https://github.com/lollipopkit/xterm.dart
|
||||||
file_picker: ^5.3.2
|
file_picker: ^5.3.2
|
||||||
plain_notification_token: ^0.0.4
|
plain_notification_token: ^0.0.4
|
||||||
highlight: ^0.7.0
|
highlight: ^0.7.0
|
||||||
|
|||||||
Reference in New Issue
Block a user