mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
opt.: use ssh term to decompress (#519)
This commit is contained in:
@@ -28,8 +28,11 @@ class HomeWidget : AppWidgetProvider() {
|
|||||||
val views = RemoteViews(context.packageName, R.layout.home_widget)
|
val views = RemoteViews(context.packageName, R.layout.home_widget)
|
||||||
val sp = context.getSharedPreferences("FlutterSharedPreferences", Context.MODE_PRIVATE)
|
val sp = context.getSharedPreferences("FlutterSharedPreferences", Context.MODE_PRIVATE)
|
||||||
var url = sp.getString("widget_$appWidgetId", null)
|
var url = sp.getString("widget_$appWidgetId", null)
|
||||||
val gUrl = sp.getString("widget_*", null)
|
|
||||||
if (url.isNullOrEmpty()) {
|
if (url.isNullOrEmpty()) {
|
||||||
|
url = sp.getString("$appWidgetId", null)
|
||||||
|
}
|
||||||
|
if (url.isNullOrEmpty()) {
|
||||||
|
val gUrl = sp.getString("widget_*", null)
|
||||||
url = gUrl
|
url = gUrl
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -690,7 +690,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 = 1047;
|
CURRENT_PROJECT_VERSION = 1048;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
||||||
@@ -700,7 +700,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.1047;
|
MARKETING_VERSION = 1.0.1048;
|
||||||
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";
|
||||||
@@ -826,7 +826,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 = 1047;
|
CURRENT_PROJECT_VERSION = 1048;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
||||||
@@ -836,7 +836,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.1047;
|
MARKETING_VERSION = 1.0.1048;
|
||||||
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";
|
||||||
@@ -854,7 +854,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 = 1047;
|
CURRENT_PROJECT_VERSION = 1048;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
||||||
@@ -864,7 +864,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.1047;
|
MARKETING_VERSION = 1.0.1048;
|
||||||
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";
|
||||||
@@ -885,7 +885,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 = 1047;
|
CURRENT_PROJECT_VERSION = 1048;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
@@ -898,7 +898,7 @@
|
|||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
"@executable_path/../../Frameworks",
|
"@executable_path/../../Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.1047;
|
MARKETING_VERSION = 1.0.1048;
|
||||||
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;
|
||||||
@@ -924,7 +924,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 = 1047;
|
CURRENT_PROJECT_VERSION = 1048;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
@@ -937,7 +937,7 @@
|
|||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
"@executable_path/../../Frameworks",
|
"@executable_path/../../Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.1047;
|
MARKETING_VERSION = 1.0.1048;
|
||||||
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)";
|
||||||
@@ -960,7 +960,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 = 1047;
|
CURRENT_PROJECT_VERSION = 1048;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
@@ -973,7 +973,7 @@
|
|||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
"@executable_path/../../Frameworks",
|
"@executable_path/../../Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.1047;
|
MARKETING_VERSION = 1.0.1048;
|
||||||
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)";
|
||||||
@@ -996,7 +996,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 = 1047;
|
CURRENT_PROJECT_VERSION = 1048;
|
||||||
DEVELOPMENT_ASSET_PATHS = "";
|
DEVELOPMENT_ASSET_PATHS = "";
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
ENABLE_PREVIEWS = YES;
|
ENABLE_PREVIEWS = YES;
|
||||||
@@ -1008,7 +1008,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.1047;
|
MARKETING_VERSION = 1.0.1048;
|
||||||
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.WatchEnd;
|
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.WatchEnd;
|
||||||
@@ -1037,7 +1037,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 = 1047;
|
CURRENT_PROJECT_VERSION = 1048;
|
||||||
DEVELOPMENT_ASSET_PATHS = "";
|
DEVELOPMENT_ASSET_PATHS = "";
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
ENABLE_PREVIEWS = YES;
|
ENABLE_PREVIEWS = YES;
|
||||||
@@ -1049,7 +1049,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.1047;
|
MARKETING_VERSION = 1.0.1048;
|
||||||
MTL_FAST_MATH = YES;
|
MTL_FAST_MATH = YES;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.WatchEnd;
|
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.WatchEnd;
|
||||||
PRODUCT_NAME = ServerBox;
|
PRODUCT_NAME = ServerBox;
|
||||||
@@ -1075,7 +1075,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 = 1047;
|
CURRENT_PROJECT_VERSION = 1048;
|
||||||
DEVELOPMENT_ASSET_PATHS = "";
|
DEVELOPMENT_ASSET_PATHS = "";
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
ENABLE_PREVIEWS = YES;
|
ENABLE_PREVIEWS = YES;
|
||||||
@@ -1087,7 +1087,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.1047;
|
MARKETING_VERSION = 1.0.1048;
|
||||||
MTL_FAST_MATH = YES;
|
MTL_FAST_MATH = YES;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.WatchEnd;
|
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.WatchEnd;
|
||||||
PRODUCT_NAME = ServerBox;
|
PRODUCT_NAME = ServerBox;
|
||||||
|
|||||||
@@ -22,7 +22,10 @@ class MyApp extends StatelessWidget {
|
|||||||
listenable: RNodes.app,
|
listenable: RNodes.app,
|
||||||
builder: (context, _) {
|
builder: (context, _) {
|
||||||
if (!Stores.setting.useSystemPrimaryColor.fetch()) {
|
if (!Stores.setting.useSystemPrimaryColor.fetch()) {
|
||||||
UIs.colorSeed = Color(Stores.setting.colorSeed.fetch());
|
final colorSeed = Color(Stores.setting.colorSeed.fetch());
|
||||||
|
UIs.colorSeed = colorSeed;
|
||||||
|
// Past code uses [UIs.primaryColor] as the primary color
|
||||||
|
UIs.primaryColor = colorSeed;
|
||||||
return _buildApp(
|
return _buildApp(
|
||||||
context,
|
context,
|
||||||
light: ThemeData(
|
light: ThemeData(
|
||||||
@@ -88,7 +91,6 @@ class MyApp extends StatelessWidget {
|
|||||||
context.setLibL10n();
|
context.setLibL10n();
|
||||||
final appL10n = AppLocalizations.of(context);
|
final appL10n = AppLocalizations.of(context);
|
||||||
if (appL10n != null) l10n = appL10n;
|
if (appL10n != null) l10n = appL10n;
|
||||||
UIs.primaryColor = Theme.of(context).colorScheme.primary;
|
|
||||||
|
|
||||||
final intros = _IntroPage.builders;
|
final intros = _IntroPage.builders;
|
||||||
if (intros.isNotEmpty) {
|
if (intros.isNotEmpty) {
|
||||||
|
|||||||
@@ -327,7 +327,8 @@ class ServerProvider extends ChangeNotifier {
|
|||||||
_setServerState(s, ServerConn.failed);
|
_setServerState(s, ServerConn.failed);
|
||||||
return;
|
return;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
TryLimiter.inc(sid);
|
// If max try times < 2 and can't write script, this will stop the status getting and etc.
|
||||||
|
// TryLimiter.inc(sid);
|
||||||
final err = SSHErr(type: SSHErrType.writeScript, message: e.toString());
|
final err = SSHErr(type: SSHErrType.writeScript, message: e.toString());
|
||||||
s.status.err = err;
|
s.status.err = err;
|
||||||
Loggers.app.warning(err);
|
Loggers.app.warning(err);
|
||||||
|
|||||||
@@ -2,6 +2,6 @@
|
|||||||
|
|
||||||
class BuildData {
|
class BuildData {
|
||||||
static const String name = "ServerBox";
|
static const String name = "ServerBox";
|
||||||
static const int build = 1047;
|
static const int build = 1048;
|
||||||
static const int script = 55;
|
static const int script = 56;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ final class _IntroPage extends StatelessWidget {
|
|||||||
|
|
||||||
static const _builders = {
|
static const _builders = {
|
||||||
1: _buildAppSettings,
|
1: _buildAppSettings,
|
||||||
2: _buildRecommended,
|
|
||||||
1006: _buildTermLetterCache,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -32,52 +30,6 @@ final class _IntroPage extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Widget _buildTermLetterCache(BuildContext context, double padTop) {
|
|
||||||
return ListView(
|
|
||||||
padding: _introListPad,
|
|
||||||
children: [
|
|
||||||
SizedBox(height: padTop),
|
|
||||||
IntroPage.title(icon: BoxIcons.bxs_terminal, big: true),
|
|
||||||
SizedBox(height: padTop),
|
|
||||||
ListTile(
|
|
||||||
leading: const Icon(Bootstrap.alphabet),
|
|
||||||
title: Text(l10n.letterCache),
|
|
||||||
subtitle: Text(l10n.letterCacheTip, style: UIs.textGrey),
|
|
||||||
trailing: StoreSwitch(prop: _setting.letterCache),
|
|
||||||
).cardx,
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
static Widget _buildRecommended(BuildContext context, double padTop) {
|
|
||||||
return ListView(
|
|
||||||
padding: _introListPad,
|
|
||||||
children: [
|
|
||||||
SizedBox(height: padTop),
|
|
||||||
IntroPage.title(icon: Bootstrap.stars, big: true),
|
|
||||||
SizedBox(height: padTop),
|
|
||||||
ListTile(
|
|
||||||
leading: const Icon(MingCute.delete_2_fill),
|
|
||||||
title: const Text('rm -r'),
|
|
||||||
subtitle: Text(l10n.sftpRmrDirSummary, style: UIs.textGrey),
|
|
||||||
trailing: StoreSwitch(prop: _setting.sftpRmrDir),
|
|
||||||
).cardx,
|
|
||||||
ListTile(
|
|
||||||
leading: const Icon(MingCute.chart_line_line, size: _kIconSize),
|
|
||||||
title: Text(l10n.stat),
|
|
||||||
subtitle: Text(l10n.parseContainerStatsTip, style: UIs.textGrey),
|
|
||||||
trailing: StoreSwitch(prop: _setting.containerParseStat),
|
|
||||||
).cardx,
|
|
||||||
ListTile(
|
|
||||||
leading: const Icon(OctIcons.cpu),
|
|
||||||
title: Text(l10n.noLineChartForCpu),
|
|
||||||
subtitle: Text(l10n.cpuViewAsProgressTip, style: UIs.textGrey),
|
|
||||||
trailing: StoreSwitch(prop: _setting.cpuViewAsProgress),
|
|
||||||
).cardx,
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
static Widget _buildAppSettings(BuildContext ctx, double padTop) {
|
static Widget _buildAppSettings(BuildContext ctx, double padTop) {
|
||||||
return ListView(
|
return ListView(
|
||||||
padding: _introListPad,
|
padding: _introListPad,
|
||||||
@@ -111,6 +63,30 @@ final class _IntroPage extends StatelessWidget {
|
|||||||
subtitle: Text(l10n.fdroidReleaseTip, style: UIs.textGrey),
|
subtitle: Text(l10n.fdroidReleaseTip, style: UIs.textGrey),
|
||||||
trailing: StoreSwitch(prop: _setting.autoCheckAppUpdate),
|
trailing: StoreSwitch(prop: _setting.autoCheckAppUpdate),
|
||||||
).cardx,
|
).cardx,
|
||||||
|
ListTile(
|
||||||
|
leading: const Icon(MingCute.delete_2_fill),
|
||||||
|
title: const Text('rm -r'),
|
||||||
|
subtitle: Text(l10n.sftpRmrDirSummary, style: UIs.textGrey),
|
||||||
|
trailing: StoreSwitch(prop: _setting.sftpRmrDir),
|
||||||
|
).cardx,
|
||||||
|
ListTile(
|
||||||
|
leading: const Icon(MingCute.chart_line_line, size: _kIconSize),
|
||||||
|
title: Text(l10n.stat),
|
||||||
|
subtitle: Text(l10n.parseContainerStatsTip, style: UIs.textGrey),
|
||||||
|
trailing: StoreSwitch(prop: _setting.containerParseStat),
|
||||||
|
).cardx,
|
||||||
|
ListTile(
|
||||||
|
leading: const Icon(OctIcons.cpu),
|
||||||
|
title: Text(l10n.noLineChartForCpu),
|
||||||
|
subtitle: Text(l10n.cpuViewAsProgressTip, style: UIs.textGrey),
|
||||||
|
trailing: StoreSwitch(prop: _setting.cpuViewAsProgress),
|
||||||
|
).cardx,
|
||||||
|
ListTile(
|
||||||
|
leading: const Icon(Bootstrap.alphabet),
|
||||||
|
title: Text(l10n.letterCache),
|
||||||
|
subtitle: Text(l10n.letterCacheTip, style: UIs.textGrey),
|
||||||
|
trailing: StoreSwitch(prop: _setting.letterCache),
|
||||||
|
).cardx,
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ class BackupPage extends StatelessWidget {
|
|||||||
child: ExpandTile(
|
child: ExpandTile(
|
||||||
leading: const Icon(Icons.file_open),
|
leading: const Icon(Icons.file_open),
|
||||||
title: Text(libL10n.file),
|
title: Text(libL10n.file),
|
||||||
initiallyExpanded: true,
|
initiallyExpanded: false,
|
||||||
children: [
|
children: [
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text(libL10n.backup),
|
title: Text(libL10n.backup),
|
||||||
@@ -112,7 +112,7 @@ class BackupPage extends StatelessWidget {
|
|||||||
child: ExpandTile(
|
child: ExpandTile(
|
||||||
leading: const Icon(Icons.storage),
|
leading: const Icon(Icons.storage),
|
||||||
title: const Text('WebDAV'),
|
title: const Text('WebDAV'),
|
||||||
initiallyExpanded: true,
|
initiallyExpanded: false,
|
||||||
children: [
|
children: [
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text(l10n.setting),
|
title: Text(l10n.setting),
|
||||||
@@ -261,11 +261,11 @@ class BackupPage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
actions: Btn.ok(
|
actions: Btn.ok(
|
||||||
onTap: (c) {
|
onTap: () {
|
||||||
for (final snippet in snippets) {
|
for (final snippet in snippets) {
|
||||||
Pros.snippet.add(snippet);
|
Pros.snippet.add(snippet);
|
||||||
}
|
}
|
||||||
c.pop();
|
context.pop();
|
||||||
context.pop();
|
context.pop();
|
||||||
},
|
},
|
||||||
).toList,
|
).toList,
|
||||||
@@ -294,7 +294,7 @@ class BackupPage extends StatelessWidget {
|
|||||||
'${libL10n.restore} ${libL10n.backup}(${backup.date})',
|
'${libL10n.restore} ${libL10n.backup}(${backup.date})',
|
||||||
)),
|
)),
|
||||||
actions: Btn.ok(
|
actions: Btn.ok(
|
||||||
onTap: (c) async {
|
onTap: () async {
|
||||||
await backup.restore(force: true);
|
await backup.restore(force: true);
|
||||||
context.pop();
|
context.pop();
|
||||||
},
|
},
|
||||||
@@ -386,7 +386,7 @@ class BackupPage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
actions: Btn.ok(onTap: (c) => context.pop(true)).toList,
|
actions: Btnx.oks,
|
||||||
);
|
);
|
||||||
if (result == true) {
|
if (result == true) {
|
||||||
final result = await Webdav.test(url.text, user.text, pwd.text);
|
final result = await Webdav.test(url.text, user.text, pwd.text);
|
||||||
@@ -423,7 +423,7 @@ class BackupPage extends StatelessWidget {
|
|||||||
'${libL10n.restore} ${libL10n.backup}(${backup.date})',
|
'${libL10n.restore} ${libL10n.backup}(${backup.date})',
|
||||||
)),
|
)),
|
||||||
actions: Btn.ok(
|
actions: Btn.ok(
|
||||||
onTap: (c) async {
|
onTap: () async {
|
||||||
await backup.restore(force: true);
|
await backup.restore(force: true);
|
||||||
context.pop();
|
context.pop();
|
||||||
},
|
},
|
||||||
@@ -454,7 +454,7 @@ class BackupPage extends StatelessWidget {
|
|||||||
final sure = await context.showRoundDialog<bool>(
|
final sure = await context.showRoundDialog<bool>(
|
||||||
title: libL10n.import,
|
title: libL10n.import,
|
||||||
child: Text(libL10n.askContinue('${spis.length} ${l10n.server}')),
|
child: Text(libL10n.askContinue('${spis.length} ${l10n.server}')),
|
||||||
actions: Btn.ok(onTap: (c) => context.pop(true)).toList,
|
actions: Btnx.oks,
|
||||||
);
|
);
|
||||||
if (sure == true) {
|
if (sure == true) {
|
||||||
final (suc, err) = await context.showLoadingDialog(
|
final (suc, err) = await context.showLoadingDialog(
|
||||||
|
|||||||
@@ -353,7 +353,7 @@ class _ContainerPageState extends State<ContainerPage> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
actions: Btn.ok(onTap: (c) async {
|
actions: Btn.ok(onTap: () async {
|
||||||
context.pop();
|
context.pop();
|
||||||
await _showAddCmdPreview(
|
await _showAddCmdPreview(
|
||||||
_buildAddCmd(
|
_buildAddCmd(
|
||||||
@@ -421,7 +421,7 @@ class _ContainerPageState extends State<ContainerPage> {
|
|||||||
hint: 'unix:///run/user/1000/docker.sock',
|
hint: 'unix:///run/user/1000/docker.sock',
|
||||||
suggestion: false,
|
suggestion: false,
|
||||||
),
|
),
|
||||||
actions: Btn.ok(onTap: (c) => _onSaveDockerHost(ctrl.text)).toList,
|
actions: Btn.ok(onTap: () => _onSaveDockerHost(ctrl.text)).toList,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -438,7 +438,7 @@ class _ContainerPageState extends State<ContainerPage> {
|
|||||||
libL10n.askContinue('${libL10n.delete} Image(${e.repository})'),
|
libL10n.askContinue('${libL10n.delete} Image(${e.repository})'),
|
||||||
),
|
),
|
||||||
actions: Btn.ok(
|
actions: Btn.ok(
|
||||||
onTap: (c) async {
|
onTap: () async {
|
||||||
context.pop();
|
context.pop();
|
||||||
final result = await _container.run('rmi ${e.id} -f');
|
final result = await _container.run('rmi ${e.id} -f');
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
@@ -483,7 +483,7 @@ class _ContainerPageState extends State<ContainerPage> {
|
|||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
actions: Btn.ok(onTap: (c) async {
|
actions: Btn.ok(onTap: () async {
|
||||||
context.pop();
|
context.pop();
|
||||||
|
|
||||||
final (result, err) = await context.showLoadingDialog(
|
final (result, err) = await context.showLoadingDialog(
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ class _PingPageState extends State<PingPage>
|
|||||||
minLines: 1,
|
minLines: 1,
|
||||||
onSubmitted: (_) => _doPing(),
|
onSubmitted: (_) => _doPing(),
|
||||||
),
|
),
|
||||||
actions: Btn.ok(onTap: (c) => _doPing()).toList,
|
actions: Btn.ok(onTap: _doPing).toList,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
child: const Icon(Icons.search),
|
child: const Icon(Icons.search),
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ class _PrivateKeyEditPageState extends State<PrivateKeyEditPage> {
|
|||||||
'${libL10n.delete} ${l10n.privateKey}(${widget.pki!.id})',
|
'${libL10n.delete} ${l10n.privateKey}(${widget.pki!.id})',
|
||||||
)),
|
)),
|
||||||
actions: Btn.ok(
|
actions: Btn.ok(
|
||||||
onTap: (c) {
|
onTap: () {
|
||||||
Pros.key.delete(widget.pki!);
|
Pros.key.delete(widget.pki!);
|
||||||
context.pop();
|
context.pop();
|
||||||
context.pop();
|
context.pop();
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ class _PrivateKeyListState extends State<PrivateKeysListPage>
|
|||||||
context.showRoundDialog(
|
context.showRoundDialog(
|
||||||
title: libL10n.attention,
|
title: libL10n.attention,
|
||||||
child: Text(l10n.addSystemPrivateKeyTip),
|
child: Text(l10n.addSystemPrivateKeyTip),
|
||||||
actions: Btn.ok(onTap: (c) {
|
actions: Btn.ok(onTap: () {
|
||||||
context.pop();
|
context.pop();
|
||||||
AppRoutes.keyEdit(pki: sysPk).go(context);
|
AppRoutes.keyEdit(pki: sysPk).go(context);
|
||||||
}).toList,
|
}).toList,
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ class _ProcessPageState extends State<ProcessPage> {
|
|||||||
child: Text(libL10n.askContinue(
|
child: Text(libL10n.askContinue(
|
||||||
'${l10n.stop} ${l10n.process}(${proc.pid})',
|
'${l10n.stop} ${l10n.process}(${proc.pid})',
|
||||||
)),
|
)),
|
||||||
actions: Btn.ok(onTap: (c) async {
|
actions: Btn.ok(onTap: () async {
|
||||||
context.pop();
|
context.pop();
|
||||||
await context.showLoadingDialog(fn: () async {
|
await context.showLoadingDialog(fn: () async {
|
||||||
await _client?.run('kill ${proc.pid}');
|
await _client?.run('kill ${proc.pid}');
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ final class _PvePageState extends State<PvePage> {
|
|||||||
? UIs.placeholder
|
? UIs.placeholder
|
||||||
: Btn.icon(
|
: Btn.icon(
|
||||||
icon: const Icon(Icons.refresh),
|
icon: const Icon(Icons.refresh),
|
||||||
onTap: (_) {
|
onTap: () {
|
||||||
_pve.err.value = null;
|
_pve.err.value = null;
|
||||||
_pve.list();
|
_pve.list();
|
||||||
_initRefreshTimer();
|
_initRefreshTimer();
|
||||||
@@ -397,22 +397,22 @@ final class _PvePageState extends State<PvePage> {
|
|||||||
if (!item.available) {
|
if (!item.available) {
|
||||||
return Btn.icon(
|
return Btn.icon(
|
||||||
icon: const Icon(Icons.play_arrow, color: Colors.grey),
|
icon: const Icon(Icons.play_arrow, color: Colors.grey),
|
||||||
onTap: (_) => _onCtrl(_pve.start, l10n.start, item));
|
onTap: () => _onCtrl(_pve.start, l10n.start, item));
|
||||||
}
|
}
|
||||||
return Row(
|
return Row(
|
||||||
children: [
|
children: [
|
||||||
Btn.icon(
|
Btn.icon(
|
||||||
icon: const Icon(Icons.stop, color: Colors.grey, size: 20),
|
icon: const Icon(Icons.stop, color: Colors.grey, size: 20),
|
||||||
padding: pad,
|
padding: pad,
|
||||||
onTap: (_) => _onCtrl(_pve.stop, l10n.stop, item)),
|
onTap: () => _onCtrl(_pve.stop, l10n.stop, item)),
|
||||||
Btn.icon(
|
Btn.icon(
|
||||||
icon: const Icon(Icons.refresh, color: Colors.grey, size: 20),
|
icon: const Icon(Icons.refresh, color: Colors.grey, size: 20),
|
||||||
padding: pad,
|
padding: pad,
|
||||||
onTap: (_) => _onCtrl(_pve.reboot, l10n.reboot, item)),
|
onTap: () => _onCtrl(_pve.reboot, l10n.reboot, item)),
|
||||||
Btn.icon(
|
Btn.icon(
|
||||||
icon: const Icon(Icons.power_off, color: Colors.grey, size: 20),
|
icon: const Icon(Icons.power_off, color: Colors.grey, size: 20),
|
||||||
padding: pad,
|
padding: pad,
|
||||||
onTap: (_) => _onCtrl(_pve.shutdown, l10n.shutdown, item)),
|
onTap: () => _onCtrl(_pve.shutdown, l10n.shutdown, item)),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -421,10 +421,7 @@ final class _PvePageState extends State<PvePage> {
|
|||||||
final sure = await context.showRoundDialog<bool>(
|
final sure = await context.showRoundDialog<bool>(
|
||||||
title: libL10n.attention,
|
title: libL10n.attention,
|
||||||
child: Text(libL10n.askContinue('$action ${item.id}')),
|
child: Text(libL10n.askContinue('$action ${item.id}')),
|
||||||
actions: Btn.ok(
|
actions: Btnx.okReds,
|
||||||
onTap: (c) => context.pop(true),
|
|
||||||
red: true,
|
|
||||||
).toList,
|
|
||||||
);
|
);
|
||||||
if (sure != true) return;
|
if (sure != true) return;
|
||||||
|
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ class _ServerEditPageState extends State<ServerEditPage> with AfterLayoutMixin {
|
|||||||
));
|
));
|
||||||
}),
|
}),
|
||||||
actions: Btn.ok(
|
actions: Btn.ok(
|
||||||
onTap: (c) async {
|
onTap: () async {
|
||||||
context.pop();
|
context.pop();
|
||||||
Pros.server.delServer(widget.spi!.id);
|
Pros.server.delServer(widget.spi!.id);
|
||||||
context.pop(true);
|
context.pop(true);
|
||||||
|
|||||||
@@ -345,7 +345,7 @@ class _ServerPageState extends State<ServerPage>
|
|||||||
const textStyle = TextStyle(color: Colors.grey);
|
const textStyle = TextStyle(color: Colors.grey);
|
||||||
final children = [
|
final children = [
|
||||||
Btn.column(
|
Btn.column(
|
||||||
onTap: (_) => _askFor(
|
onTap: () => _askFor(
|
||||||
func: () async {
|
func: () async {
|
||||||
if (Stores.setting.showSuspendTip.fetch()) {
|
if (Stores.setting.showSuspendTip.fetch()) {
|
||||||
await context.showRoundDialog(
|
await context.showRoundDialog(
|
||||||
@@ -368,7 +368,7 @@ class _ServerPageState extends State<ServerPage>
|
|||||||
textStyle: textStyle,
|
textStyle: textStyle,
|
||||||
),
|
),
|
||||||
Btn.column(
|
Btn.column(
|
||||||
onTap: (_) => _askFor(
|
onTap: () => _askFor(
|
||||||
func: () => srv.client?.execWithPwd(
|
func: () => srv.client?.execWithPwd(
|
||||||
ShellFunc.shutdown.exec(srv.spi.id),
|
ShellFunc.shutdown.exec(srv.spi.id),
|
||||||
context: context,
|
context: context,
|
||||||
@@ -382,7 +382,7 @@ class _ServerPageState extends State<ServerPage>
|
|||||||
textStyle: textStyle,
|
textStyle: textStyle,
|
||||||
),
|
),
|
||||||
Btn.column(
|
Btn.column(
|
||||||
onTap: (_) => _askFor(
|
onTap: () => _askFor(
|
||||||
func: () => srv.client?.execWithPwd(
|
func: () => srv.client?.execWithPwd(
|
||||||
ShellFunc.reboot.exec(srv.spi.id),
|
ShellFunc.reboot.exec(srv.spi.id),
|
||||||
context: context,
|
context: context,
|
||||||
@@ -396,7 +396,7 @@ class _ServerPageState extends State<ServerPage>
|
|||||||
textStyle: textStyle,
|
textStyle: textStyle,
|
||||||
),
|
),
|
||||||
Btn.column(
|
Btn.column(
|
||||||
onTap: (_) => AppRoutes.serverEdit(spi: srv.spi).go(context),
|
onTap: () => AppRoutes.serverEdit(spi: srv.spi).go(context),
|
||||||
icon: const Icon(Icons.edit, color: Colors.grey),
|
icon: const Icon(Icons.edit, color: Colors.grey),
|
||||||
text: libL10n.edit,
|
text: libL10n.edit,
|
||||||
textStyle: textStyle,
|
textStyle: textStyle,
|
||||||
@@ -693,7 +693,7 @@ ${ss.err?.message ?? 'null'}
|
|||||||
title: libL10n.attention,
|
title: libL10n.attention,
|
||||||
child: Text(libL10n.askContinue('$typ ${l10n.server}($name)')),
|
child: Text(libL10n.askContinue('$typ ${l10n.server}($name)')),
|
||||||
actions: Btn.ok(
|
actions: Btn.ok(
|
||||||
onTap: (c) {
|
onTap: () {
|
||||||
context.pop();
|
context.pop();
|
||||||
func();
|
func();
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
actions: Btn.ok(
|
actions: Btn.ok(
|
||||||
onTap: (c) {
|
onTap: () {
|
||||||
context.pop();
|
context.pop();
|
||||||
_setting.box.deleteAll(_setting.box.keys);
|
_setting.box.deleteAll(_setting.box.keys);
|
||||||
context.showSnackBar(l10n.success);
|
context.showSnackBar(l10n.success);
|
||||||
@@ -266,7 +266,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
children: children,
|
children: children,
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
actions: Btn.ok(onTap: (c) => _onSaveColor(ctrl.text)).toList,
|
actions: Btn.ok(onTap: () => _onSaveColor(ctrl.text)).toList,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
@@ -765,7 +765,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
onSubmitted: _onSaveTextScaler,
|
onSubmitted: _onSaveTextScaler,
|
||||||
suggestion: false,
|
suggestion: false,
|
||||||
),
|
),
|
||||||
actions: Btn.ok(onTap: (c) => _onSaveTextScaler(ctrl.text)).toList,
|
actions: Btn.ok(onTap: () => _onSaveTextScaler(ctrl.text)).toList,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -870,7 +870,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
suggestion: false,
|
suggestion: false,
|
||||||
onSubmitted: (_) => onSave(),
|
onSubmitted: (_) => onSave(),
|
||||||
),
|
),
|
||||||
actions: Btn.ok(onTap: (c) => onSave()).toList,
|
actions: Btn.ok(onTap: onSave).toList,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1111,7 +1111,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
context.showRoundDialog(
|
context.showRoundDialog(
|
||||||
title: libL10n.fail,
|
title: libL10n.fail,
|
||||||
child: Text('${l10n.invalid} URL'),
|
child: Text('${l10n.invalid} URL'),
|
||||||
actions: Btn.ok(onTap: (c) => context.pop()).toList,
|
actions: Btnx.oks,
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1147,7 +1147,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
actions: Btn.ok(onTap: (c) => onSave(ctrl.text)).toList,
|
actions: Btn.ok(onTap: () => onSave(ctrl.text)).toList,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
@@ -1205,7 +1205,7 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
suggestion: false,
|
suggestion: false,
|
||||||
onSubmitted: (_) => onSave(),
|
onSubmitted: (_) => onSave(),
|
||||||
),
|
),
|
||||||
actions: [Btn.ok(onTap: (_) => onSave())],
|
actions: Btn.ok(onTap: onSave).toList,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ class _SnippetEditPageState extends State<SnippetEditPage>
|
|||||||
'${libL10n.delete} ${l10n.snippet}(${widget.snippet!.name})',
|
'${libL10n.delete} ${l10n.snippet}(${widget.snippet!.name})',
|
||||||
)),
|
)),
|
||||||
actions: Btn.ok(
|
actions: Btn.ok(
|
||||||
onTap: (c) {
|
onTap: () {
|
||||||
Pros.snippet.del(widget.snippet!);
|
Pros.snippet.del(widget.snippet!);
|
||||||
context.pop();
|
context.pop();
|
||||||
context.pop();
|
context.pop();
|
||||||
|
|||||||
@@ -73,10 +73,7 @@ class _SSHTabPageState extends State<SSHTabPage>
|
|||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
title: Text(libL10n.attention),
|
title: Text(libL10n.attention),
|
||||||
content: Text('${libL10n.close} SSH ${l10n.conn}($name) ?'),
|
content: Text('${libL10n.close} SSH ${l10n.conn}($name) ?'),
|
||||||
actions: Btn.ok(
|
actions: Btnx.okReds,
|
||||||
onTap: (c) => context.pop(true),
|
|
||||||
red: true,
|
|
||||||
).toList,
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
@@ -274,7 +271,7 @@ final class _TabBar extends StatelessWidget implements PreferredSizeWidget {
|
|||||||
color: color,
|
color: color,
|
||||||
size: 17,
|
size: 17,
|
||||||
),
|
),
|
||||||
onTap: (_) => onClose(name),
|
onTap: () => onClose(name),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
|
|||||||
@@ -226,7 +226,7 @@ class _LocalStoragePageState extends State<LocalStoragePage> {
|
|||||||
title: libL10n.file,
|
title: libL10n.file,
|
||||||
child: Text(fileName),
|
child: Text(fileName),
|
||||||
actions: [
|
actions: [
|
||||||
Btn.ok(onTap: (c) {
|
Btn.ok(onTap: () {
|
||||||
context.pop();
|
context.pop();
|
||||||
context.pop(file.path);
|
context.pop(file.path);
|
||||||
}),
|
}),
|
||||||
@@ -350,7 +350,7 @@ class _LocalStoragePageState extends State<LocalStoragePage> {
|
|||||||
title: libL10n.delete,
|
title: libL10n.delete,
|
||||||
child: Text(libL10n.askContinue('${libL10n.delete} $fileName')),
|
child: Text(libL10n.askContinue('${libL10n.delete} $fileName')),
|
||||||
actions: Btn.ok(
|
actions: Btn.ok(
|
||||||
onTap: (c) async {
|
onTap: () async {
|
||||||
context.pop();
|
context.pop();
|
||||||
try {
|
try {
|
||||||
await file.delete(recursive: true);
|
await file.delete(recursive: true);
|
||||||
|
|||||||
@@ -396,7 +396,7 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
|
|||||||
var newPerm = perm.copyWith();
|
var newPerm = perm.copyWith();
|
||||||
final ok = await context.showRoundDialog(
|
final ok = await context.showRoundDialog(
|
||||||
child: UnixPermEditor(perm: perm, onChanged: (p) => newPerm = p),
|
child: UnixPermEditor(perm: perm, onChanged: (p) => newPerm = p),
|
||||||
actions: [Btn.ok(onTap: (context) => context.pop(true))],
|
actions: Btnx.okReds,
|
||||||
);
|
);
|
||||||
|
|
||||||
final permStr = newPerm.perm;
|
final permStr = newPerm.perm;
|
||||||
@@ -594,7 +594,8 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
|
|||||||
final textController = TextEditingController();
|
final textController = TextEditingController();
|
||||||
|
|
||||||
void onSubmitted() async {
|
void onSubmitted() async {
|
||||||
if (textController.text.isEmpty) {
|
final text = textController.text.trim();
|
||||||
|
if (text.isEmpty) {
|
||||||
context.showRoundDialog(
|
context.showRoundDialog(
|
||||||
child: Text(libL10n.empty),
|
child: Text(libL10n.empty),
|
||||||
actions: Btnx.oks,
|
actions: Btnx.oks,
|
||||||
@@ -605,7 +606,7 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
|
|||||||
|
|
||||||
final (suc, err) = await context.showLoadingDialog(
|
final (suc, err) = await context.showLoadingDialog(
|
||||||
fn: () async {
|
fn: () async {
|
||||||
final dir = '${_status.path!.path}/${textController.text}';
|
final dir = '${_status.path!.path}/$text';
|
||||||
await _status.client!.mkdir(dir);
|
await _status.client!.mkdir(dir);
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
@@ -626,7 +627,7 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
|
|||||||
onSubmitted: (_) => onSubmitted(),
|
onSubmitted: (_) => onSubmitted(),
|
||||||
),
|
),
|
||||||
actions: Btn.ok(
|
actions: Btn.ok(
|
||||||
onTap: (c) => onSubmitted(),
|
onTap: onSubmitted,
|
||||||
red: true,
|
red: true,
|
||||||
).toList,
|
).toList,
|
||||||
);
|
);
|
||||||
@@ -637,13 +638,12 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
|
|||||||
final textController = TextEditingController();
|
final textController = TextEditingController();
|
||||||
|
|
||||||
void onSubmitted() async {
|
void onSubmitted() async {
|
||||||
if (textController.text.isEmpty) {
|
final text = textController.text.trim();
|
||||||
|
if (text.isEmpty) {
|
||||||
context.showRoundDialog(
|
context.showRoundDialog(
|
||||||
title: libL10n.attention,
|
title: libL10n.attention,
|
||||||
child: Text(libL10n.empty),
|
child: Text(libL10n.empty),
|
||||||
actions: Btn.ok(
|
actions: Btnx.oks,
|
||||||
onTap: (c) => context.pop(),
|
|
||||||
).toList,
|
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -651,7 +651,7 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
|
|||||||
|
|
||||||
final (suc, err) = await context.showLoadingDialog(
|
final (suc, err) = await context.showLoadingDialog(
|
||||||
fn: () async {
|
fn: () async {
|
||||||
final path = '${_status.path!.path}/${textController.text}';
|
final path = '${_status.path!.path}/$text';
|
||||||
await _client!.run('touch "$path"');
|
await _client!.run('touch "$path"');
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
@@ -671,10 +671,7 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
|
|||||||
suggestion: true,
|
suggestion: true,
|
||||||
onSubmitted: (_) => onSubmitted(),
|
onSubmitted: (_) => onSubmitted(),
|
||||||
),
|
),
|
||||||
actions: Btn.ok(
|
actions: Btn.ok(onTap: onSubmitted, red: true).toList,
|
||||||
onTap: (c) => onSubmitted(),
|
|
||||||
red: true,
|
|
||||||
).toList,
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -683,13 +680,12 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
|
|||||||
final textController = TextEditingController(text: file.filename);
|
final textController = TextEditingController(text: file.filename);
|
||||||
|
|
||||||
void onSubmitted() async {
|
void onSubmitted() async {
|
||||||
if (textController.text.isEmpty) {
|
final text = textController.text.trim();
|
||||||
|
if (text.isEmpty) {
|
||||||
context.showRoundDialog(
|
context.showRoundDialog(
|
||||||
title: libL10n.attention,
|
title: libL10n.attention,
|
||||||
child: Text(libL10n.empty),
|
child: Text(libL10n.empty),
|
||||||
actions: Btn.ok(
|
actions: Btnx.oks,
|
||||||
onTap: (c) => context.pop(),
|
|
||||||
).toList,
|
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -743,17 +739,11 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
|
|||||||
final confirm = await context.showRoundDialog(
|
final confirm = await context.showRoundDialog(
|
||||||
title: libL10n.attention,
|
title: libL10n.attention,
|
||||||
child: SimpleMarkdown(data: '```sh\n$cmd\n```'),
|
child: SimpleMarkdown(data: '```sh\n$cmd\n```'),
|
||||||
actions: [
|
actions: Btnx.cancelRedOk,
|
||||||
Btn.cancel(onTap: (c) => c.pop(false)),
|
|
||||||
Btn.ok(onTap: (c) => c.pop(true), red: true),
|
|
||||||
],
|
|
||||||
);
|
);
|
||||||
if (confirm != true) return;
|
if (confirm != true) return;
|
||||||
|
|
||||||
final (suc, err) = await context.showLoadingDialog(
|
await AppRoutes.ssh(spi: widget.spi, initCmd: cmd).go(context);
|
||||||
fn: () => _client?.run(cmd) ?? Future.value(false),
|
|
||||||
);
|
|
||||||
if (suc == null || err != null) return;
|
|
||||||
_listDir();
|
_listDir();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ class _SftpMissionPageState extends State<SftpMissionPage> {
|
|||||||
'${libL10n.delete} ${l10n.mission}($name)',
|
'${libL10n.delete} ${l10n.mission}($name)',
|
||||||
)),
|
)),
|
||||||
actions: Btn.ok(
|
actions: Btn.ok(
|
||||||
onTap: (c) {
|
onTap: () {
|
||||||
Pros.sftp.cancel(id);
|
Pros.sftp.cancel(id);
|
||||||
context.pop();
|
context.pop();
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -471,7 +471,7 @@
|
|||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 1047;
|
CURRENT_PROJECT_VERSION = 1048;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
INFOPLIST_KEY_CFBundleDisplayName = "Server Box";
|
INFOPLIST_KEY_CFBundleDisplayName = "Server Box";
|
||||||
@@ -481,7 +481,7 @@
|
|||||||
"@executable_path/../Frameworks",
|
"@executable_path/../Frameworks",
|
||||||
);
|
);
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
||||||
MARKETING_VERSION = 1.0.1047;
|
MARKETING_VERSION = 1.0.1048;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
||||||
PRODUCT_NAME = "Server Box";
|
PRODUCT_NAME = "Server Box";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
@@ -608,7 +608,7 @@
|
|||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 1047;
|
CURRENT_PROJECT_VERSION = 1048;
|
||||||
DEVELOPMENT_TEAM = BA88US33G6;
|
DEVELOPMENT_TEAM = BA88US33G6;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
INFOPLIST_KEY_CFBundleDisplayName = "Server Box";
|
INFOPLIST_KEY_CFBundleDisplayName = "Server Box";
|
||||||
@@ -618,7 +618,7 @@
|
|||||||
"@executable_path/../Frameworks",
|
"@executable_path/../Frameworks",
|
||||||
);
|
);
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
||||||
MARKETING_VERSION = 1.0.1047;
|
MARKETING_VERSION = 1.0.1048;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
||||||
PRODUCT_NAME = "Server Box";
|
PRODUCT_NAME = "Server Box";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
@@ -638,7 +638,7 @@
|
|||||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "3rd Party Mac Developer Application";
|
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "3rd Party Mac Developer Application";
|
||||||
CODE_SIGN_STYLE = Manual;
|
CODE_SIGN_STYLE = Manual;
|
||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 1047;
|
CURRENT_PROJECT_VERSION = 1048;
|
||||||
DEVELOPMENT_TEAM = "";
|
DEVELOPMENT_TEAM = "";
|
||||||
"DEVELOPMENT_TEAM[sdk=macosx*]" = BA88US33G6;
|
"DEVELOPMENT_TEAM[sdk=macosx*]" = BA88US33G6;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
@@ -649,7 +649,7 @@
|
|||||||
"@executable_path/../Frameworks",
|
"@executable_path/../Frameworks",
|
||||||
);
|
);
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
||||||
MARKETING_VERSION = 1.0.1047;
|
MARKETING_VERSION = 1.0.1048;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
||||||
PRODUCT_NAME = "Server Box";
|
PRODUCT_NAME = "Server Box";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
|
|||||||
@@ -385,8 +385,8 @@ packages:
|
|||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
path: "."
|
path: "."
|
||||||
ref: "v1.0.111"
|
ref: "v1.0.114"
|
||||||
resolved-ref: c220f27ce606e0a342cf9add6a90ce4c11844972
|
resolved-ref: "01f4588bf8b9da701c1b808aa542dd4a05533244"
|
||||||
url: "https://github.com/lppcg/fl_lib"
|
url: "https://github.com/lppcg/fl_lib"
|
||||||
source: git
|
source: git
|
||||||
version: "0.0.1"
|
version: "0.0.1"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
name: server_box
|
name: server_box
|
||||||
description: server status & toolbox app.
|
description: server status & toolbox app.
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
version: 1.0.1047+1047
|
version: 1.0.1048+1048
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=3.0.0"
|
sdk: ">=3.0.0"
|
||||||
@@ -61,7 +61,7 @@ dependencies:
|
|||||||
fl_lib:
|
fl_lib:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/lppcg/fl_lib
|
url: https://github.com/lppcg/fl_lib
|
||||||
ref: v1.0.111
|
ref: v1.0.114
|
||||||
|
|
||||||
dependency_overrides:
|
dependency_overrides:
|
||||||
# dartssh2:
|
# dartssh2:
|
||||||
|
|||||||
Reference in New Issue
Block a user