mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
decrease res files
This commit is contained in:
@@ -28,11 +28,8 @@ Especially thanks to <a href="https://github.com/TerminalStudio/dartssh2">dartss
|
|||||||
|
|
||||||
## 🔖 Feature
|
## 🔖 Feature
|
||||||
- [x] Functions
|
- [x] Functions
|
||||||
- [x] `SSH` Terminal
|
- [x] `SSH` Terminal, `SFTP`
|
||||||
- [x] `Docker & Pkg` Manager
|
- [x] `Docker & Pkg` Manager
|
||||||
- [x] `SFTP`
|
|
||||||
- [x] `Snippet`
|
|
||||||
- [x] `Ping`
|
|
||||||
- [x] Status charts
|
- [x] Status charts
|
||||||
- [x] etc.
|
- [x] etc.
|
||||||
- [x] i18n (English, Chinese)
|
- [x] i18n (English, Chinese)
|
||||||
|
|||||||
@@ -356,7 +356,7 @@
|
|||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 227;
|
CURRENT_PROJECT_VERSION = 228;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
@@ -364,7 +364,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.227;
|
MARKETING_VERSION = 1.0.228;
|
||||||
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";
|
||||||
@@ -486,7 +486,7 @@
|
|||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 227;
|
CURRENT_PROJECT_VERSION = 228;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
@@ -494,7 +494,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.227;
|
MARKETING_VERSION = 1.0.228;
|
||||||
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";
|
||||||
@@ -510,7 +510,7 @@
|
|||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 227;
|
CURRENT_PROJECT_VERSION = 228;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
@@ -518,7 +518,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.227;
|
MARKETING_VERSION = 1.0.228;
|
||||||
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";
|
||||||
|
|||||||
@@ -1,62 +1,62 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
<true/>
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>$(EXECUTABLE_NAME)</string>
|
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
<string>$(EXECUTABLE_NAME)</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>6.0</string>
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>ServerBox</string>
|
<string>6.0</string>
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundleLocalizations</key>
|
||||||
<string>APPL</string>
|
<array>
|
||||||
<key>CFBundleShortVersionString</key>
|
<string>en</string>
|
||||||
<string>$(MARKETING_VERSION)</string>
|
<string>zh</string>
|
||||||
<key>CFBundleSignature</key>
|
</array>
|
||||||
<string>????</string>
|
<key>CFBundleName</key>
|
||||||
<key>CFBundleVersion</key>
|
<string>ServerBox</string>
|
||||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
<key>CFBundlePackageType</key>
|
||||||
<key>LSRequiresIPhoneOS</key>
|
<string>APPL</string>
|
||||||
<true/>
|
<key>CFBundleShortVersionString</key>
|
||||||
<key>UILaunchStoryboardName</key>
|
<string>$(MARKETING_VERSION)</string>
|
||||||
<string>LaunchScreen</string>
|
<key>CFBundleSignature</key>
|
||||||
<key>UIMainStoryboardFile</key>
|
<string>????</string>
|
||||||
<string>Main</string>
|
<key>CFBundleVersion</key>
|
||||||
<key>UIStatusBarHidden</key>
|
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||||
<false/>
|
<key>ITSAppUsesNonExemptEncryption</key>
|
||||||
<key>UISupportedInterfaceOrientations</key>
|
<false/>
|
||||||
<array>
|
<key>LSRequiresIPhoneOS</key>
|
||||||
<string>UIInterfaceOrientationPortrait</string>
|
<true/>
|
||||||
</array>
|
<key>LSSupportsOpeningDocumentsInPlace</key>
|
||||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
<true/>
|
||||||
<array>
|
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||||
<string>UIInterfaceOrientationPortrait</string>
|
<true/>
|
||||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
<key>UIBackgroundModes</key>
|
||||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
<array>
|
||||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
<string>processing</string>
|
||||||
</array>
|
</array>
|
||||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
<key>UILaunchStoryboardName</key>
|
||||||
<false/>
|
<string>LaunchScreen</string>
|
||||||
<key>CFBundleLocalizations</key>
|
<key>UIMainStoryboardFile</key>
|
||||||
<array>
|
<string>Main</string>
|
||||||
<string>en</string>
|
<key>UIStatusBarHidden</key>
|
||||||
<string>zh</string>
|
<false/>
|
||||||
</array>
|
<key>UISupportedInterfaceOrientations</key>
|
||||||
<key>CADisableMinimumFrameDurationOnPhone</key>
|
<array>
|
||||||
<true/>
|
<string>UIInterfaceOrientationPortrait</string>
|
||||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
</array>
|
||||||
<true/>
|
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||||
<key>UIBackgroundModes</key>
|
<array>
|
||||||
<array>
|
<string>UIInterfaceOrientationPortrait</string>
|
||||||
<string>fetch</string>
|
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||||
</array>
|
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||||
<key>LSSupportsOpeningDocumentsInPlace</key>
|
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||||
<true/>
|
</array>
|
||||||
<key>ITSAppUsesNonExemptEncryption</key>
|
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||||
<false/>
|
<false/>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ class MyApp extends StatelessWidget {
|
|||||||
builder: (_, colorValue, __) {
|
builder: (_, colorValue, __) {
|
||||||
primaryColor = Color(colorValue);
|
primaryColor = Color(colorValue);
|
||||||
return ValueListenableBuilder<int>(
|
return ValueListenableBuilder<int>(
|
||||||
valueListenable: _setting.nightMode.listenable(),
|
valueListenable: _setting.themeMode.listenable(),
|
||||||
builder: (_, mode, __) => _buildApp(mode),
|
builder: (_, mode, __) => _buildApp(mode),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:xterm/ui.dart';
|
import 'package:xterm/ui.dart';
|
||||||
import '../../res/terminal_color.dart';
|
import '../../res/terminal.dart';
|
||||||
|
|
||||||
class TerminalUITheme {
|
class TerminalUITheme {
|
||||||
final Color cursor;
|
final Color cursor;
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
class BuildData {
|
class BuildData {
|
||||||
static const String name = "ServerBox";
|
static const String name = "ServerBox";
|
||||||
static const int build = 227;
|
static const int build = 228;
|
||||||
static const String engine =
|
static const String engine =
|
||||||
"Flutter 3.7.3 • channel stable • https://github.com/flutter/flutter.git\nFramework • revision 9944297138 (2 weeks ago) • 2023-02-08 15:46:04 -0800\nEngine • revision 248290d6d5\nTools • Dart 2.19.2 • DevTools 2.20.1\n";
|
"Flutter 3.7.3 • channel stable • https://github.com/flutter/flutter.git\nFramework • revision 9944297138 (2 weeks ago) • 2023-02-08 15:46:04 -0800\nEngine • revision 248290d6d5\nTools • Dart 2.19.2 • DevTools 2.20.1\n";
|
||||||
static const String buildAt = "2023-02-25 18:23:00.718232";
|
static const String buildAt = "2023-02-25 20:13:29.020860";
|
||||||
static const int modifications = 13;
|
static const int modifications = 2;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
import 'package:flutter/widgets.dart';
|
|
||||||
|
|
||||||
final appIcon = Image.asset('assets/app_icon.png');
|
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
/// RegExp for number
|
||||||
final numReg = RegExp(r'\s{1,}');
|
final numReg = RegExp(r'\s{1,}');
|
||||||
|
|
||||||
/// Private Key max allowed size is 20kb
|
/// Private Key max allowed size is 20kb
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
const roundRectCardPadding = EdgeInsets.symmetric(horizontal: 17, vertical: 13);
|
|
||||||
@@ -5,14 +5,14 @@ import '../model/server/net_speed.dart';
|
|||||||
import '../model/server/server_status.dart';
|
import '../model/server/server_status.dart';
|
||||||
import '../model/server/tcp_status.dart';
|
import '../model/server/tcp_status.dart';
|
||||||
|
|
||||||
get _initMemory => Memory(
|
Memory get _initMemory => Memory(
|
||||||
total: 1,
|
total: 1,
|
||||||
used: 0,
|
used: 0,
|
||||||
free: 1,
|
free: 1,
|
||||||
cache: 0,
|
cache: 0,
|
||||||
avail: 1,
|
avail: 1,
|
||||||
);
|
);
|
||||||
get _initOneTimeCpuStatus => OneTimeCpuStatus(
|
OneTimeCpuStatus get _initOneTimeCpuStatus => OneTimeCpuStatus(
|
||||||
'cpu',
|
'cpu',
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
@@ -22,28 +22,28 @@ get _initOneTimeCpuStatus => OneTimeCpuStatus(
|
|||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
);
|
);
|
||||||
get initCpuStatus => CpuStatus(
|
CpuStatus get initCpuStatus => CpuStatus(
|
||||||
[_initOneTimeCpuStatus],
|
[_initOneTimeCpuStatus],
|
||||||
[_initOneTimeCpuStatus],
|
[_initOneTimeCpuStatus],
|
||||||
'',
|
'',
|
||||||
);
|
);
|
||||||
get _initNetSpeedPart => NetSpeedPart(
|
NetSpeedPart get _initNetSpeedPart => NetSpeedPart(
|
||||||
'',
|
'',
|
||||||
BigInt.zero,
|
BigInt.zero,
|
||||||
BigInt.zero,
|
BigInt.zero,
|
||||||
BigInt.zero,
|
BigInt.zero,
|
||||||
);
|
);
|
||||||
get initNetSpeed => NetSpeed(
|
NetSpeed get initNetSpeed => NetSpeed(
|
||||||
[_initNetSpeedPart],
|
[_initNetSpeedPart],
|
||||||
[_initNetSpeedPart],
|
[_initNetSpeedPart],
|
||||||
);
|
);
|
||||||
get _initSwap => Swap(
|
Swap get _initSwap => Swap(
|
||||||
total: 1,
|
total: 1,
|
||||||
used: 0,
|
used: 0,
|
||||||
free: 1,
|
free: 1,
|
||||||
cached: 0,
|
cached: 0,
|
||||||
);
|
);
|
||||||
get initStatus => ServerStatus(
|
ServerStatus get initStatus => ServerStatus(
|
||||||
cpu: initCpuStatus,
|
cpu: initCpuStatus,
|
||||||
mem: _initMemory,
|
mem: _initMemory,
|
||||||
sysVer: 'Loading...',
|
sysVer: 'Loading...',
|
||||||
|
|||||||
@@ -1,6 +1,26 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:toolbox/data/model/ssh/terminal_color.dart';
|
import 'package:toolbox/data/model/ssh/terminal_color.dart';
|
||||||
|
|
||||||
|
const termDarkTheme = TerminalUITheme(
|
||||||
|
cursor: Color(0XAAAEAFAD),
|
||||||
|
selection: Color(0XAAAEAFAD),
|
||||||
|
foreground: Color(0XFFCCCCCC),
|
||||||
|
background: Colors.black,
|
||||||
|
searchHitBackground: Color(0XFFFFFF2B),
|
||||||
|
searchHitBackgroundCurrent: Color(0XFF31FF26),
|
||||||
|
searchHitForeground: Color(0XFF000000),
|
||||||
|
);
|
||||||
|
|
||||||
|
const termLightTheme = TerminalUITheme(
|
||||||
|
cursor: Color(0XFFAEAFAD),
|
||||||
|
selection: Color.fromARGB(102, 174, 175, 173),
|
||||||
|
foreground: Color(0XFF000000),
|
||||||
|
background: Color(0XFFFFFFFF),
|
||||||
|
searchHitBackground: Color(0XFFFFFF2B),
|
||||||
|
searchHitBackgroundCurrent: Color(0XFF31FF26),
|
||||||
|
searchHitForeground: Color(0XFF000000),
|
||||||
|
);
|
||||||
|
|
||||||
class VGATerminalColor extends TerminalColors {
|
class VGATerminalColor extends TerminalColors {
|
||||||
VGATerminalColor()
|
VGATerminalColor()
|
||||||
: super(
|
: super(
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
import '../model/ssh/terminal_color.dart';
|
|
||||||
|
|
||||||
const termDarkTheme = TerminalUITheme(
|
|
||||||
cursor: Color(0XAAAEAFAD),
|
|
||||||
selection: Color(0XAAAEAFAD),
|
|
||||||
foreground: Color(0XFFCCCCCC),
|
|
||||||
background: Colors.black,
|
|
||||||
searchHitBackground: Color(0XFFFFFF2B),
|
|
||||||
searchHitBackgroundCurrent: Color(0XFF31FF26),
|
|
||||||
searchHitForeground: Color(0XFF000000),
|
|
||||||
);
|
|
||||||
|
|
||||||
const termLightTheme = TerminalUITheme(
|
|
||||||
cursor: Color(0XFFAEAFAD),
|
|
||||||
selection: Color.fromARGB(102, 174, 175, 173),
|
|
||||||
foreground: Color(0XFF000000),
|
|
||||||
background: Color(0XFFFFFFFF),
|
|
||||||
searchHitBackground: Color(0XFFFFFF2B),
|
|
||||||
searchHitBackgroundCurrent: Color(0XFF31FF26),
|
|
||||||
searchHitForeground: Color(0XFF000000),
|
|
||||||
);
|
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
/// Font style
|
||||||
|
|
||||||
const textSize18 = TextStyle(fontSize: 18);
|
const textSize18 = TextStyle(fontSize: 18);
|
||||||
const textSize11 = TextStyle(fontSize: 11);
|
const textSize11 = TextStyle(fontSize: 11);
|
||||||
const textSize13 = TextStyle(fontSize: 13);
|
const textSize13 = TextStyle(fontSize: 13);
|
||||||
@@ -7,3 +9,11 @@ const textSize13Grey = TextStyle(color: Colors.grey, fontSize: 13);
|
|||||||
const textSize27 = TextStyle(fontSize: 27);
|
const textSize27 = TextStyle(fontSize: 27);
|
||||||
|
|
||||||
const grey = TextStyle(color: Colors.grey);
|
const grey = TextStyle(color: Colors.grey);
|
||||||
|
|
||||||
|
/// Icon
|
||||||
|
|
||||||
|
final appIcon = Image.asset('assets/app_icon.png');
|
||||||
|
|
||||||
|
/// Padding
|
||||||
|
|
||||||
|
const roundRectCardPadding = EdgeInsets.symmetric(horizontal: 17, vertical: 13);
|
||||||
@@ -31,6 +31,6 @@ class SettingStore extends PersistentStore {
|
|||||||
property('maxRetryCount', defaultValue: 7);
|
property('maxRetryCount', defaultValue: 7);
|
||||||
|
|
||||||
/// Night mode: 0 -> auto, 1 -> light, 2 -> dark
|
/// Night mode: 0 -> auto, 1 -> light, 2 -> dark
|
||||||
StoreProperty<int> get nightMode =>
|
StoreProperty<int> get themeMode =>
|
||||||
property('nightMode', defaultValue: ThemeMode.system.index);
|
property('nightMode', defaultValue: ThemeMode.system.index);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import 'package:toolbox/data/res/color.dart';
|
|||||||
import '../../core/extension/colorx.dart';
|
import '../../core/extension/colorx.dart';
|
||||||
import '../../core/utils/ui.dart';
|
import '../../core/utils/ui.dart';
|
||||||
import '../../data/model/app/backup.dart';
|
import '../../data/model/app/backup.dart';
|
||||||
import '../../data/res/font_style.dart';
|
import '../../data/res/ui.dart';
|
||||||
import '../../data/store/private_key.dart';
|
import '../../data/store/private_key.dart';
|
||||||
import '../../data/store/server.dart';
|
import '../../data/store/server.dart';
|
||||||
import '../../data/store/setting.dart';
|
import '../../data/store/setting.dart';
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import '../../data/model/server/server_private_info.dart';
|
|||||||
import '../../data/provider/docker.dart';
|
import '../../data/provider/docker.dart';
|
||||||
import '../../data/provider/server.dart';
|
import '../../data/provider/server.dart';
|
||||||
import '../../data/res/error.dart';
|
import '../../data/res/error.dart';
|
||||||
import '../../data/res/font_style.dart';
|
|
||||||
import '../../data/res/menu.dart';
|
import '../../data/res/menu.dart';
|
||||||
|
import '../../data/res/ui.dart';
|
||||||
import '../../data/res/url.dart';
|
import '../../data/res/url.dart';
|
||||||
import '../../data/store/docker.dart';
|
import '../../data/store/docker.dart';
|
||||||
import '../../locator.dart';
|
import '../../locator.dart';
|
||||||
|
|||||||
@@ -11,9 +11,8 @@ import '../../data/model/app/dynamic_color.dart';
|
|||||||
import '../../data/model/app/navigation_item.dart';
|
import '../../data/model/app/navigation_item.dart';
|
||||||
import '../../data/provider/server.dart';
|
import '../../data/provider/server.dart';
|
||||||
import '../../data/res/build_data.dart';
|
import '../../data/res/build_data.dart';
|
||||||
import '../../data/res/font_style.dart';
|
|
||||||
import '../../data/res/icon.dart';
|
|
||||||
import '../../data/res/tab.dart';
|
import '../../data/res/tab.dart';
|
||||||
|
import '../../data/res/ui.dart';
|
||||||
import '../../data/res/url.dart';
|
import '../../data/res/url.dart';
|
||||||
import '../../data/store/setting.dart';
|
import '../../data/store/setting.dart';
|
||||||
import '../../locator.dart';
|
import '../../locator.dart';
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import '../../core/utils/ui.dart';
|
|||||||
import '../../data/model/server/ping_result.dart';
|
import '../../data/model/server/ping_result.dart';
|
||||||
import '../../data/provider/server.dart';
|
import '../../data/provider/server.dart';
|
||||||
import '../../data/res/color.dart';
|
import '../../data/res/color.dart';
|
||||||
import '../../data/res/font_style.dart';
|
import '../../data/res/ui.dart';
|
||||||
import '../../locator.dart';
|
import '../../locator.dart';
|
||||||
import '../widget/input_field.dart';
|
import '../widget/input_field.dart';
|
||||||
import '../widget/round_rect_card.dart';
|
import '../widget/round_rect_card.dart';
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import '../../core/utils/ui.dart';
|
|||||||
import '../../data/model/server/server_private_info.dart';
|
import '../../data/model/server/server_private_info.dart';
|
||||||
import '../../data/provider/pkg.dart';
|
import '../../data/provider/pkg.dart';
|
||||||
import '../../data/provider/server.dart';
|
import '../../data/provider/server.dart';
|
||||||
import '../../data/res/font_style.dart';
|
import '../../data/res/ui.dart';
|
||||||
import '../../locator.dart';
|
import '../../locator.dart';
|
||||||
import '../widget/center_loading.dart';
|
import '../widget/center_loading.dart';
|
||||||
import '../widget/round_rect_card.dart';
|
import '../widget/round_rect_card.dart';
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import '../../../core/utils/server.dart';
|
|||||||
import '../../../core/utils/ui.dart';
|
import '../../../core/utils/ui.dart';
|
||||||
import '../../../data/model/server/private_key_info.dart';
|
import '../../../data/model/server/private_key_info.dart';
|
||||||
import '../../../data/provider/private_key.dart';
|
import '../../../data/provider/private_key.dart';
|
||||||
import '../../../data/res/font_style.dart';
|
import '../../../data/res/ui.dart';
|
||||||
import '../../../locator.dart';
|
import '../../../locator.dart';
|
||||||
import '../../widget/input_decoration.dart';
|
import '../../widget/input_decoration.dart';
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import 'package:provider/provider.dart';
|
|||||||
|
|
||||||
import '../../../core/route.dart';
|
import '../../../core/route.dart';
|
||||||
import '../../../data/provider/private_key.dart';
|
import '../../../data/provider/private_key.dart';
|
||||||
import '../../../data/res/font_style.dart';
|
import '../../../data/res/ui.dart';
|
||||||
import 'edit.dart';
|
import 'edit.dart';
|
||||||
import '../../../view/widget/round_rect_card.dart';
|
import '../../../view/widget/round_rect_card.dart';
|
||||||
|
|
||||||
|
|||||||
@@ -9,9 +9,8 @@ import '../../../data/model/server/server.dart';
|
|||||||
import '../../../data/model/server/server_status.dart';
|
import '../../../data/model/server/server_status.dart';
|
||||||
import '../../../data/provider/server.dart';
|
import '../../../data/provider/server.dart';
|
||||||
import '../../../data/res/color.dart';
|
import '../../../data/res/color.dart';
|
||||||
import '../../../data/res/font_style.dart';
|
|
||||||
import '../../../data/res/padding.dart';
|
|
||||||
import '../../../data/res/sizedbox.dart';
|
import '../../../data/res/sizedbox.dart';
|
||||||
|
import '../../../data/res/ui.dart';
|
||||||
import '../../../data/store/setting.dart';
|
import '../../../data/store/setting.dart';
|
||||||
import '../../../locator.dart';
|
import '../../../locator.dart';
|
||||||
import '../../widget/round_rect_card.dart';
|
import '../../widget/round_rect_card.dart';
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import '../../../data/model/server/server_private_info.dart';
|
|||||||
import '../../../data/provider/private_key.dart';
|
import '../../../data/provider/private_key.dart';
|
||||||
import '../../../data/provider/server.dart';
|
import '../../../data/provider/server.dart';
|
||||||
import '../../../data/res/color.dart';
|
import '../../../data/res/color.dart';
|
||||||
import '../../../data/res/font_style.dart';
|
import '../../../data/res/ui.dart';
|
||||||
import '../../../data/store/private_key.dart';
|
import '../../../data/store/private_key.dart';
|
||||||
import '../../../locator.dart';
|
import '../../../locator.dart';
|
||||||
import '../../widget/input_decoration.dart';
|
import '../../widget/input_decoration.dart';
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ import '../../../data/model/server/server_status.dart';
|
|||||||
import '../../../data/provider/server.dart';
|
import '../../../data/provider/server.dart';
|
||||||
import '../../../data/provider/snippet.dart';
|
import '../../../data/provider/snippet.dart';
|
||||||
import '../../../data/res/color.dart';
|
import '../../../data/res/color.dart';
|
||||||
import '../../../data/res/font_style.dart';
|
|
||||||
import '../../../data/res/menu.dart';
|
import '../../../data/res/menu.dart';
|
||||||
|
import '../../../data/res/ui.dart';
|
||||||
import '../../../data/res/url.dart';
|
import '../../../data/res/url.dart';
|
||||||
import '../../../data/store/setting.dart';
|
import '../../../data/store/setting.dart';
|
||||||
import '../../../locator.dart';
|
import '../../../locator.dart';
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ import '../../data/provider/app.dart';
|
|||||||
import '../../data/provider/server.dart';
|
import '../../data/provider/server.dart';
|
||||||
import '../../data/res/build_data.dart';
|
import '../../data/res/build_data.dart';
|
||||||
import '../../data/res/color.dart';
|
import '../../data/res/color.dart';
|
||||||
import '../../data/res/font_style.dart';
|
|
||||||
import '../../data/res/tab.dart';
|
import '../../data/res/tab.dart';
|
||||||
|
import '../../data/res/ui.dart';
|
||||||
import '../../data/store/setting.dart';
|
import '../../data/store/setting.dart';
|
||||||
import '../../locator.dart';
|
import '../../locator.dart';
|
||||||
import '../widget/round_rect_card.dart';
|
import '../widget/round_rect_card.dart';
|
||||||
@@ -50,7 +50,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
_setting = locator<SettingStore>();
|
_setting = locator<SettingStore>();
|
||||||
_launchPageIdx = _setting.launchPage.fetch()!;
|
_launchPageIdx = _setting.launchPage.fetch()!;
|
||||||
_termThemeIdx = _setting.termColorIdx.fetch()!;
|
_termThemeIdx = _setting.termColorIdx.fetch()!;
|
||||||
_nightMode = _setting.nightMode.fetch()!;
|
_nightMode = _setting.themeMode.fetch()!;
|
||||||
_updateInterval = _setting.serverStatusUpdateInterval.fetch()!.toDouble();
|
_updateInterval = _setting.serverStatusUpdateInterval.fetch()!.toDouble();
|
||||||
_maxRetryCount = _setting.maxRetryCount.fetch()!.toDouble();
|
_maxRetryCount = _setting.maxRetryCount.fetch()!.toDouble();
|
||||||
}
|
}
|
||||||
@@ -400,7 +400,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
onChangeEnd: (val) {
|
onChangeEnd: (val) {
|
||||||
_setting.nightMode.put(val.toInt());
|
_setting.themeMode.put(val.toInt());
|
||||||
},
|
},
|
||||||
label: _buildNightModeStr(_nightMode),
|
label: _buildNightModeStr(_nightMode),
|
||||||
divisions: 2,
|
divisions: 2,
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import '../../../core/route.dart';
|
|||||||
import '../../../core/utils/misc.dart';
|
import '../../../core/utils/misc.dart';
|
||||||
import '../../../core/utils/ui.dart';
|
import '../../../core/utils/ui.dart';
|
||||||
import '../../../data/model/app/path_with_prefix.dart';
|
import '../../../data/model/app/path_with_prefix.dart';
|
||||||
import '../../../data/res/font_style.dart';
|
|
||||||
import '../../../data/res/path.dart';
|
import '../../../data/res/path.dart';
|
||||||
|
import '../../../data/res/ui.dart';
|
||||||
import '../../widget/fade_in.dart';
|
import '../../widget/fade_in.dart';
|
||||||
import 'downloading.dart';
|
import 'downloading.dart';
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import '../../../core/utils/misc.dart';
|
|||||||
import '../../../core/utils/ui.dart';
|
import '../../../core/utils/ui.dart';
|
||||||
import '../../../data/model/sftp/download_status.dart';
|
import '../../../data/model/sftp/download_status.dart';
|
||||||
import '../../../data/provider/sftp_download.dart';
|
import '../../../data/provider/sftp_download.dart';
|
||||||
import '../../../data/res/font_style.dart';
|
import '../../../data/res/ui.dart';
|
||||||
import '../../widget/center_loading.dart';
|
import '../../widget/center_loading.dart';
|
||||||
import '../../widget/round_rect_card.dart';
|
import '../../widget/round_rect_card.dart';
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import 'package:flutter_gen/gen_l10n/l10n.dart';
|
|||||||
import '../../../core/utils/ui.dart';
|
import '../../../core/utils/ui.dart';
|
||||||
import '../../../data/model/server/snippet.dart';
|
import '../../../data/model/server/snippet.dart';
|
||||||
import '../../../data/provider/snippet.dart';
|
import '../../../data/provider/snippet.dart';
|
||||||
import '../../../data/res/font_style.dart';
|
import '../../../data/res/ui.dart';
|
||||||
import '../../../locator.dart';
|
import '../../../locator.dart';
|
||||||
import '../../widget/input_decoration.dart';
|
import '../../widget/input_decoration.dart';
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
import '../../../data/res/ui.dart';
|
||||||
import '/core/route.dart';
|
import '/core/route.dart';
|
||||||
import '/data/provider/snippet.dart';
|
import '/data/provider/snippet.dart';
|
||||||
import '/data/res/font_style.dart';
|
|
||||||
import 'edit.dart';
|
import 'edit.dart';
|
||||||
import '/view/widget/round_rect_card.dart';
|
import '/view/widget/round_rect_card.dart';
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import '../../data/model/server/server_private_info.dart';
|
|||||||
import '../../data/model/ssh/virtual_key.dart';
|
import '../../data/model/ssh/virtual_key.dart';
|
||||||
import '../../data/provider/virtual_keyboard.dart';
|
import '../../data/provider/virtual_keyboard.dart';
|
||||||
import '../../data/res/color.dart';
|
import '../../data/res/color.dart';
|
||||||
import '../../data/res/terminal_theme.dart';
|
import '../../data/res/terminal.dart';
|
||||||
import '../../data/res/virtual_key.dart';
|
import '../../data/res/virtual_key.dart';
|
||||||
import '../../data/store/setting.dart';
|
import '../../data/store/setting.dart';
|
||||||
import '../../locator.dart';
|
import '../../locator.dart';
|
||||||
@@ -272,58 +272,56 @@ class _SSHPageState extends State<SSHPage> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void _onTapUp(TapUpDetails details, CellOffset offset) {
|
void _onTapUp(TapUpDetails details, CellOffset offset) {
|
||||||
{
|
if (_menuController.isShown) {
|
||||||
if (_menuController.isShown) {
|
_menuController.remove();
|
||||||
_menuController.remove();
|
return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
final selected = terminalSelected;
|
|
||||||
if (selected.trim().isEmpty) {
|
|
||||||
// _menuController.show(
|
|
||||||
// context: context,
|
|
||||||
// contextMenuBuilder: (context) {
|
|
||||||
// return TextSelectionToolbar(
|
|
||||||
// anchorAbove: detail.globalPosition,
|
|
||||||
// anchorBelow: detail.globalPosition,
|
|
||||||
// children: [
|
|
||||||
// TextButton(
|
|
||||||
// child: Text(
|
|
||||||
// 'Paste',
|
|
||||||
// style: _menuTextStyle,
|
|
||||||
// ),
|
|
||||||
// onPressed: () async {
|
|
||||||
// _paste();
|
|
||||||
// _menuController.remove();
|
|
||||||
// },
|
|
||||||
// )
|
|
||||||
// ],
|
|
||||||
// );
|
|
||||||
// },
|
|
||||||
// );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
_menuController.show(
|
|
||||||
context: context,
|
|
||||||
contextMenuBuilder: (context) {
|
|
||||||
return TextSelectionToolbar(
|
|
||||||
anchorAbove: details.globalPosition,
|
|
||||||
anchorBelow: details.globalPosition,
|
|
||||||
children: [
|
|
||||||
TextButton(
|
|
||||||
child: Text(
|
|
||||||
_s.copy,
|
|
||||||
style: _menuTextStyle,
|
|
||||||
),
|
|
||||||
onPressed: () {
|
|
||||||
_terminalController.setSelection(null);
|
|
||||||
copy(selected);
|
|
||||||
_menuController.remove();
|
|
||||||
},
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
final selected = terminalSelected;
|
||||||
|
if (selected.trim().isEmpty) {
|
||||||
|
// _menuController.show(
|
||||||
|
// context: context,
|
||||||
|
// contextMenuBuilder: (context) {
|
||||||
|
// return TextSelectionToolbar(
|
||||||
|
// anchorAbove: detail.globalPosition,
|
||||||
|
// anchorBelow: detail.globalPosition,
|
||||||
|
// children: [
|
||||||
|
// TextButton(
|
||||||
|
// child: Text(
|
||||||
|
// 'Paste',
|
||||||
|
// style: _menuTextStyle,
|
||||||
|
// ),
|
||||||
|
// onPressed: () async {
|
||||||
|
// _paste();
|
||||||
|
// _menuController.remove();
|
||||||
|
// },
|
||||||
|
// )
|
||||||
|
// ],
|
||||||
|
// );
|
||||||
|
// },
|
||||||
|
// );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_menuController.show(
|
||||||
|
context: context,
|
||||||
|
contextMenuBuilder: (context) {
|
||||||
|
return TextSelectionToolbar(
|
||||||
|
anchorAbove: details.globalPosition,
|
||||||
|
anchorBelow: details.globalPosition,
|
||||||
|
children: [
|
||||||
|
TextButton(
|
||||||
|
child: Text(
|
||||||
|
_s.copy,
|
||||||
|
style: _menuTextStyle,
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
_terminalController.setSelection(null);
|
||||||
|
copy(selected);
|
||||||
|
_menuController.remove();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user