mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2026-02-01 05:45:04 +01:00
#135 opt.
This commit is contained in:
@@ -470,7 +470,7 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||
CURRENT_PROJECT_VERSION = 471;
|
||||
CURRENT_PROJECT_VERSION = 472;
|
||||
DEVELOPMENT_TEAM = BA88US33G6;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
||||
@@ -478,7 +478,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0.471;
|
||||
MARKETING_VERSION = 1.0.472;
|
||||
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 = 471;
|
||||
CURRENT_PROJECT_VERSION = 472;
|
||||
DEVELOPMENT_TEAM = BA88US33G6;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
||||
@@ -610,7 +610,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0.471;
|
||||
MARKETING_VERSION = 1.0.472;
|
||||
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 = 471;
|
||||
CURRENT_PROJECT_VERSION = 472;
|
||||
DEVELOPMENT_TEAM = BA88US33G6;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
||||
@@ -636,7 +636,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0.471;
|
||||
MARKETING_VERSION = 1.0.472;
|
||||
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 = 471;
|
||||
CURRENT_PROJECT_VERSION = 472;
|
||||
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.471;
|
||||
MARKETING_VERSION = 1.0.472;
|
||||
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 = 471;
|
||||
CURRENT_PROJECT_VERSION = 472;
|
||||
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.471;
|
||||
MARKETING_VERSION = 1.0.472;
|
||||
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 = 471;
|
||||
CURRENT_PROJECT_VERSION = 472;
|
||||
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.471;
|
||||
MARKETING_VERSION = 1.0.472;
|
||||
MTL_FAST_MATH = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
class BuildData {
|
||||
static const String name = "ServerBox";
|
||||
static const int build = 471;
|
||||
static const int build = 472;
|
||||
static const String engine = "3.10.6";
|
||||
static const String buildAt = "2023-08-13 22:48:32.724672";
|
||||
static const int modifications = 6;
|
||||
static const String buildAt = "2023-08-14 11:11:21.335805";
|
||||
static const int modifications = 2;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,6 @@ const seperator = 'SrvBoxSep';
|
||||
const serverBoxDir = r'$HOME/.config/server_box';
|
||||
const shellPath = '$serverBoxDir/mobile_app.sh';
|
||||
|
||||
const echoPWD = 'echo \$PWD';
|
||||
|
||||
const statusCmds = [
|
||||
'cat /proc/net/dev && date +%s',
|
||||
'cat /etc/os-release | grep PRETTY_NAME',
|
||||
|
||||
@@ -8,7 +8,6 @@ import 'package:flutter/services.dart';
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:toolbox/core/extension/navigator.dart';
|
||||
import 'package:toolbox/data/res/server_cmd.dart';
|
||||
import 'package:xterm/xterm.dart';
|
||||
|
||||
import '../../../core/route.dart';
|
||||
@@ -25,6 +24,8 @@ import '../../../data/store/setting.dart';
|
||||
import '../../../locator.dart';
|
||||
import '../storage/sftp.dart';
|
||||
|
||||
const echoPWD = 'echo \$PWD';
|
||||
|
||||
class SSHPage extends StatefulWidget {
|
||||
final ServerPrivateInfo spi;
|
||||
final String? initCmd;
|
||||
@@ -39,6 +40,7 @@ class _SSHPageState extends State<SSHPage> {
|
||||
final _setting = locator<SettingStore>();
|
||||
late final _terminal = Terminal(inputHandler: _keyboard);
|
||||
final TerminalController _terminalController = TerminalController();
|
||||
final ContextMenuController _menuController = ContextMenuController();
|
||||
final List<List<VirtKey>> _virtKeysList = [];
|
||||
|
||||
late MediaQueryData _media;
|
||||
@@ -97,7 +99,7 @@ class _SSHPageState extends State<SSHPage> {
|
||||
Widget child = Scaffold(
|
||||
backgroundColor: _terminalTheme.background,
|
||||
body: _buildBody(),
|
||||
bottomNavigationBar: _buildBottom(),
|
||||
bottomNavigationBar: isDesktop ? null : _buildBottom(),
|
||||
);
|
||||
if (isIOS) {
|
||||
child = AnnotatedRegion(
|
||||
@@ -116,6 +118,7 @@ class _SSHPageState extends State<SSHPage> {
|
||||
_media.padding.top,
|
||||
child: TerminalView(
|
||||
_terminal,
|
||||
onTapUp: _onTapUp,
|
||||
controller: _terminalController,
|
||||
keyboardType: _keyboardType,
|
||||
textStyle: _terminalStyle,
|
||||
@@ -362,4 +365,49 @@ class _SSHPageState extends State<SSHPage> {
|
||||
.transform(const Utf8Decoder())
|
||||
.listen(_terminal.write);
|
||||
}
|
||||
|
||||
void _onTapUp(TapUpDetails details, CellOffset offset) {
|
||||
if (_menuController.isShown) {
|
||||
_menuController.remove();
|
||||
return;
|
||||
}
|
||||
final selected = terminalSelected;
|
||||
final children = <Widget>[
|
||||
// TextButton(
|
||||
// onPressed: () {
|
||||
// _paste();
|
||||
// },
|
||||
// child: Text(_s.paste),
|
||||
// ),
|
||||
];
|
||||
if (selected?.trim().isNotEmpty ?? false) {
|
||||
children.add(
|
||||
TextButton(
|
||||
child: Text(
|
||||
_s.copy,
|
||||
),
|
||||
onPressed: () {
|
||||
_terminalController.setSelection(CellAnchor(0), CellAnchor(0));
|
||||
if (selected != null) {
|
||||
copy2Clipboard(selected);
|
||||
}
|
||||
_menuController.remove();
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
if (children.isEmpty) {
|
||||
return;
|
||||
}
|
||||
_menuController.show(
|
||||
context: context,
|
||||
contextMenuBuilder: (context) {
|
||||
return TextSelectionToolbar(
|
||||
anchorAbove: details.globalPosition,
|
||||
anchorBelow: details.globalPosition,
|
||||
children: children,
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -475,9 +475,9 @@
|
||||
baseConfigurationReference = C1C758C41C4E208965A68933 /* Pods-RunnerTests.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CURRENT_PROJECT_VERSION = 471;
|
||||
CURRENT_PROJECT_VERSION = 472;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MARKETING_VERSION = 1.0.471;
|
||||
MARKETING_VERSION = 1.0.472;
|
||||
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 = 471;
|
||||
CURRENT_PROJECT_VERSION = 472;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MARKETING_VERSION = 1.0.471;
|
||||
MARKETING_VERSION = 1.0.472;
|
||||
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 = 471;
|
||||
CURRENT_PROJECT_VERSION = 472;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MARKETING_VERSION = 1.0.471;
|
||||
MARKETING_VERSION = 1.0.472;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = tech.lolli.serverBox.RunnerTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
|
||||
@@ -1048,7 +1048,7 @@ packages:
|
||||
description:
|
||||
path: "."
|
||||
ref: master
|
||||
resolved-ref: "475bd72d5e3f75d7c2323225e931f71145cafc2e"
|
||||
resolved-ref: "132bbb310c6026ba1f5f2ef4eac81f874ee06774"
|
||||
url: "https://github.com/lollipopkit/xterm.dart"
|
||||
source: git
|
||||
version: "3.6.1-pre"
|
||||
|
||||
Reference in New Issue
Block a user