opt.: android only arm64 & ssh tab page

This commit is contained in:
lollipopkit
2023-12-02 00:21:07 +08:00
parent 90403b655b
commit fc0c9b3a49
14 changed files with 55 additions and 54 deletions

View File

@@ -53,6 +53,10 @@ android {
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
ndk {
abiFilters 'arm64-v8a'
}
}
signingConfigs {

View File

@@ -586,7 +586,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 649;
CURRENT_PROJECT_VERSION = 653;
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
@@ -596,7 +596,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.649;
MARKETING_VERSION = 1.0.653;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@@ -720,7 +720,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 649;
CURRENT_PROJECT_VERSION = 653;
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
@@ -730,7 +730,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.649;
MARKETING_VERSION = 1.0.653;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@@ -748,7 +748,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 649;
CURRENT_PROJECT_VERSION = 653;
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
@@ -758,7 +758,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.649;
MARKETING_VERSION = 1.0.653;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@@ -779,7 +779,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 649;
CURRENT_PROJECT_VERSION = 653;
DEVELOPMENT_TEAM = BA88US33G6;
GCC_C_LANGUAGE_STANDARD = gnu11;
GENERATE_INFOPLIST_FILE = YES;
@@ -792,7 +792,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0.649;
MARKETING_VERSION = 1.0.653;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget;
@@ -818,7 +818,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 649;
CURRENT_PROJECT_VERSION = 653;
DEVELOPMENT_TEAM = BA88US33G6;
GCC_C_LANGUAGE_STANDARD = gnu11;
GENERATE_INFOPLIST_FILE = YES;
@@ -831,7 +831,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0.649;
MARKETING_VERSION = 1.0.653;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -854,7 +854,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 649;
CURRENT_PROJECT_VERSION = 653;
DEVELOPMENT_TEAM = BA88US33G6;
GCC_C_LANGUAGE_STANDARD = gnu11;
GENERATE_INFOPLIST_FILE = YES;
@@ -867,7 +867,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0.649;
MARKETING_VERSION = 1.0.653;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -890,7 +890,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 649;
CURRENT_PROJECT_VERSION = 653;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_PREVIEWS = YES;
@@ -902,7 +902,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.649;
MARKETING_VERSION = 1.0.653;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.WatchEnd;
@@ -931,7 +931,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 649;
CURRENT_PROJECT_VERSION = 653;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_PREVIEWS = YES;
@@ -943,7 +943,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.649;
MARKETING_VERSION = 1.0.653;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.WatchEnd;
PRODUCT_NAME = ServerBox;
@@ -969,7 +969,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 649;
CURRENT_PROJECT_VERSION = 653;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_PREVIEWS = YES;
@@ -981,7 +981,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.649;
MARKETING_VERSION = 1.0.653;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.WatchEnd;
PRODUCT_NAME = ServerBox;

View File

@@ -0,0 +1,9 @@
extension ListX<T> on List<T> {
List<T> joinWith(T item, [bool self = true]) {
final list = self ? this : List<T>.from(this);
for (var i = length - 1; i > 0; i--) {
list.insert(i, item);
}
return list;
}
}

View File

@@ -2,14 +2,14 @@ import 'package:dartssh2/dartssh2.dart';
extension SftpFile on SftpFileMode {
String get str {
final user = getRoleMode(userRead, userWrite, userExecute);
final group = getRoleMode(groupRead, groupWrite, groupExecute);
final other = getRoleMode(otherRead, otherWrite, otherExecute);
final user = _getRoleMode(userRead, userWrite, userExecute);
final group = _getRoleMode(groupRead, groupWrite, groupExecute);
final other = _getRoleMode(otherRead, otherWrite, otherExecute);
return '$user$group$other';
}
}
String getRoleMode(bool r, bool w, bool x) {
String _getRoleMode(bool r, bool w, bool x) {
return '${r ? 'r' : '-'}${w ? 'w' : '-'}${x ? 'x' : '-'}';
}

View File

@@ -37,10 +37,14 @@ Future<void> loadFontFile(String localPath) async {
void switchStatusBar({required bool hide}) {
if (hide) {
SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky,
overlays: []);
SystemChrome.setEnabledSystemUIMode(
SystemUiMode.immersiveSticky,
overlays: [],
);
} else {
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge,
overlays: [SystemUiOverlay.top, SystemUiOverlay.bottom]);
SystemChrome.setEnabledSystemUIMode(
SystemUiMode.edgeToEdge,
overlays: [SystemUiOverlay.top, SystemUiOverlay.bottom],
);
}
}

View File

@@ -33,8 +33,7 @@ enum ShellFunc {
/// Issue #168
/// Use `sh` for compatibility
static final installShellCmd =
"""
static final installShellCmd = """
mkdir -p $_homeVar/$_srvBoxDir
cat << 'EOF' > $_installShellPath
${ShellFunc.allScript}
@@ -135,8 +134,7 @@ fi''';
static final String allScript = () {
final sb = StringBuffer();
sb.write(
'''
sb.write('''
#!/bin/sh
# Script for ServerBox app v1.0.${BuildData.build}
# DO NOT delete this file while app is running
@@ -155,8 +153,7 @@ userId=\$(id -u)
''');
// Write each func
for (final func in values) {
sb.write(
'''
sb.write('''
${func.name}() {
${func._cmd.split('\n').map((e) => '\t$e').join('\n')}
}

View File

@@ -2,9 +2,9 @@
class BuildData {
static const String name = "ServerBox";
static const int build = 649;
static const int build = 653;
static const String engine = "3.16.0";
static const String buildAt = "2023-11-23 22:29:30";
static const int modifications = 11;
static const int script = 29;
static const String buildAt = "2023-11-27 19:18:56";
static const int modifications = 3;
static const int script = 30;
}

View File

@@ -226,7 +226,7 @@ class SettingStore extends PersistentStore {
/// Server func btns display name
late final serverFuncBtnsDisplayName =
StoreProperty(box, 'serverFuncBtnsDisplayName', true);
StoreProperty(box, 'serverFuncBtnsDisplayName', false);
// Never show these settings for users
//

View File

@@ -581,9 +581,6 @@ class _ServerPageState extends State<ServerPage>
if (failedInfo == null) {
return l10n.serverTabFailed;
}
if (failedInfo.contains('encypted')) {
return l10n.serverTabPlzSave;
}
return failedInfo;
}
}

View File

@@ -26,7 +26,7 @@ class _ServerDetailOrderPageState extends State<ServerDetailOrderPage> {
Widget build(BuildContext context) {
return Scaffold(
appBar: CustomAppBar(
title: Text(l10n.serverOrder),
title: Text(l10n.serverDetailOrder),
),
body: _buildBody(),
);

View File

@@ -41,8 +41,7 @@ class _ServerOrderPageState extends State<ServerOrderPage> {
}),
padding: const EdgeInsets.symmetric(horizontal: 7, vertical: 3),
buildDefaultDragHandles: false,
itemBuilder: (_, index) =>
_buildItem(index, Pros.server.serverOrder[index]),
itemBuilder: (_, idx) => _buildItem(idx, Pros.server.serverOrder[idx]),
itemCount: Pros.server.serverOrder.length,
);
}

View File

@@ -20,7 +20,6 @@ class _SSHTabPageState extends State<SSHTabPage>
late final _tabIds = <String, Widget>{
l10n.add: _buildAddPage(),
};
final _tabKeys = <String, GlobalKey>{};
late var _tabController = TabController(
length: _tabIds.length,
vsync: this,
@@ -34,6 +33,7 @@ class _SSHTabPageState extends State<SSHTabPage>
controller: _tabController,
tabs: _tabIds.keys.map(_buildTabItem).toList(),
isScrollable: true,
tabAlignment: TabAlignment.start,
dividerColor: Colors.transparent,
),
body: _buildBody(),
@@ -75,7 +75,6 @@ class _SSHTabPageState extends State<SSHTabPage>
}
_tabIds.remove(e);
_refreshTabs();
//_tabKeys[e]?.currentState?.dispose();
},
),
],
@@ -107,7 +106,6 @@ class _SSHTabPageState extends State<SSHTabPage>
spi: spi,
pop: false,
);
_tabKeys[name] = key;
_refreshTabs();
_tabController.animateTo(_tabIds.length - 1);
},

View File

@@ -1,8 +1,6 @@
PODS:
- dynamic_color (0.0.2):
- FlutterMacOS
- flutter_secure_storage_macos (6.1.1):
- FlutterMacOS
- FlutterMacOS (1.0.0)
- icloud_storage (0.0.1):
- FlutterMacOS
@@ -21,7 +19,6 @@ PODS:
DEPENDENCIES:
- dynamic_color (from `Flutter/ephemeral/.symlinks/plugins/dynamic_color/macos`)
- flutter_secure_storage_macos (from `Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos`)
- FlutterMacOS (from `Flutter/ephemeral`)
- icloud_storage (from `Flutter/ephemeral/.symlinks/plugins/icloud_storage/macos`)
- macos_window_utils (from `Flutter/ephemeral/.symlinks/plugins/macos_window_utils/macos`)
@@ -33,8 +30,6 @@ DEPENDENCIES:
EXTERNAL SOURCES:
dynamic_color:
:path: Flutter/ephemeral/.symlinks/plugins/dynamic_color/macos
flutter_secure_storage_macos:
:path: Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos
FlutterMacOS:
:path: Flutter/ephemeral
icloud_storage:
@@ -52,7 +47,6 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
dynamic_color: 2eaa27267de1ca20d879fbd6e01259773fb1670f
flutter_secure_storage_macos: d56e2d218c1130b262bef8b4a7d64f88d7f9c9ea
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
icloud_storage: 33b05299e26d1391d724da8d62860e702380a1cd
macos_window_utils: 933f91f64805e2eb91a5bd057cf97cd097276663

View File

@@ -2,8 +2,7 @@ import 'package:flutter/foundation.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:toolbox/data/model/server/nvdia.dart';
const _raw =
'''
const _raw = '''
<?xml version="1.0" ?>
<!DOCTYPE nvidia_smi_log SYSTEM "nvsmi_device_v12.dtd">
<nvidia_smi_log>