mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
#95 fix
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
android:textColor="@color/widgetText"
|
||||
android:textSize="23sp"
|
||||
android:textStyle="bold"
|
||||
android:maxLines="1"
|
||||
tools:text="Server Name" />
|
||||
|
||||
<RelativeLayout
|
||||
|
||||
@@ -470,7 +470,7 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||
CURRENT_PROJECT_VERSION = 426;
|
||||
CURRENT_PROJECT_VERSION = 446;
|
||||
DEVELOPMENT_TEAM = BA88US33G6;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
||||
@@ -478,7 +478,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0.426;
|
||||
MARKETING_VERSION = 1.0.446;
|
||||
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 = 426;
|
||||
CURRENT_PROJECT_VERSION = 446;
|
||||
DEVELOPMENT_TEAM = BA88US33G6;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
||||
@@ -610,7 +610,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0.426;
|
||||
MARKETING_VERSION = 1.0.446;
|
||||
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 = 426;
|
||||
CURRENT_PROJECT_VERSION = 446;
|
||||
DEVELOPMENT_TEAM = BA88US33G6;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
|
||||
@@ -636,7 +636,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0.426;
|
||||
MARKETING_VERSION = 1.0.446;
|
||||
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 = 426;
|
||||
CURRENT_PROJECT_VERSION = 446;
|
||||
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.426;
|
||||
MARKETING_VERSION = 1.0.446;
|
||||
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 = 426;
|
||||
CURRENT_PROJECT_VERSION = 446;
|
||||
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.426;
|
||||
MARKETING_VERSION = 1.0.446;
|
||||
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 = 426;
|
||||
CURRENT_PROJECT_VERSION = 446;
|
||||
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.426;
|
||||
MARKETING_VERSION = 1.0.446;
|
||||
MTL_FAST_MATH = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
|
||||
@@ -33,7 +33,16 @@ enum AppShellFuncType {
|
||||
case AppShellFuncType.status:
|
||||
return statusCmds.join(_cmdDivider);
|
||||
case AppShellFuncType.docker:
|
||||
return dockerCmds.join(_cmdDivider);
|
||||
return '''
|
||||
# If the cmd result contains "permission denied", try to use `sudo`
|
||||
result=\$(docker version 2>&1)
|
||||
deniedStr="permission denied"
|
||||
containStr=\$(echo \$result | grep "\${deniedStr}")
|
||||
if [[ \$containStr != "" ]]; then
|
||||
${dockerCmds.join(_cmdDivider)}
|
||||
else
|
||||
${dockerCmds.map((e) => "sudo -S $e").join(_cmdDivider)}
|
||||
fi''';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ class DockerProvider extends BusyProvider {
|
||||
try {
|
||||
final statsLines = statsRaw.split('\n');
|
||||
statsLines.removeWhere((element) => element.isEmpty);
|
||||
statsLines.removeAt(0);
|
||||
if (statsLines.isNotEmpty) statsLines.removeAt(0);
|
||||
for (var item in items!) {
|
||||
final statsLine = statsLines.firstWhere(
|
||||
(element) => element.contains(item.containerId),
|
||||
@@ -148,6 +148,7 @@ class DockerProvider extends BusyProvider {
|
||||
}
|
||||
|
||||
Future<void> _onPwd(String event, StreamSink<Uint8List> stdin) async {
|
||||
print(event);
|
||||
if (isRequestingPwd) return;
|
||||
isRequestingPwd = true;
|
||||
if (event.contains('[sudo] password for ')) {
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
class BuildData {
|
||||
static const String name = "ServerBox";
|
||||
static const int build = 426;
|
||||
static const int build = 446;
|
||||
static const String engine = "3.10.6";
|
||||
static const String buildAt = "2023-08-06 16:29:23.492978";
|
||||
static const String buildAt = "2023-08-07 18:34:12.547300";
|
||||
static const int modifications = 4;
|
||||
}
|
||||
|
||||
@@ -261,10 +261,8 @@ class _DockerManagePageState extends State<DockerManagePage> {
|
||||
final items = <Widget>[
|
||||
_buildLoading(),
|
||||
_buildVersion(),
|
||||
_buildPsHeader(),
|
||||
_buildPsItems(),
|
||||
_buildImageHeader(),
|
||||
_buildImageItems(),
|
||||
_buildPs(),
|
||||
_buildImage(),
|
||||
_buildEditHost(),
|
||||
].map((e) => RoundRectCard(e));
|
||||
return ListView(
|
||||
@@ -273,21 +271,18 @@ class _DockerManagePageState extends State<DockerManagePage> {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildImageHeader() {
|
||||
return ListTile(
|
||||
title: Text(_s.imagesList),
|
||||
subtitle: Text(
|
||||
_s.dockerImagesFmt(_docker.images!.length),
|
||||
style: grey,
|
||||
Widget _buildImage() {
|
||||
final items = <Widget>[
|
||||
ListTile(
|
||||
title: Text(_s.imagesList),
|
||||
subtitle: Text(
|
||||
_s.dockerImagesFmt(_docker.images!.length),
|
||||
style: grey,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildImageItems() {
|
||||
if (_docker.images == null) {
|
||||
return nil;
|
||||
}
|
||||
return Column(children: _docker.images!.map(_buildImageItem).toList());
|
||||
];
|
||||
items.addAll(_docker.images!.map(_buildImageItem));
|
||||
return Column(children: items);
|
||||
}
|
||||
|
||||
Widget _buildImageItem(DockerImage e) {
|
||||
@@ -395,20 +390,17 @@ class _DockerManagePageState extends State<DockerManagePage> {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildPsHeader() {
|
||||
return ListTile(
|
||||
title: Text(_s.containerStatus),
|
||||
subtitle: Text(_buildPsCardSubtitle(_docker.items!), style: grey),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildPsItems() {
|
||||
if (_docker.items == null) {
|
||||
return nil;
|
||||
}
|
||||
Widget _buildPs() {
|
||||
final items = <Widget>[
|
||||
ListTile(
|
||||
title: Text(_s.containerStatus),
|
||||
subtitle: Text(_buildPsCardSubtitle(_docker.items!), style: grey),
|
||||
),
|
||||
];
|
||||
items.addAll(_docker.items!.map(_buildPsItem));
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: _docker.items!.map(_buildPsItem).toList(),
|
||||
children: items,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -475,9 +475,9 @@
|
||||
baseConfigurationReference = C1C758C41C4E208965A68933 /* Pods-RunnerTests.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CURRENT_PROJECT_VERSION = 426;
|
||||
CURRENT_PROJECT_VERSION = 446;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MARKETING_VERSION = 1.0.426;
|
||||
MARKETING_VERSION = 1.0.446;
|
||||
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 = 426;
|
||||
CURRENT_PROJECT_VERSION = 446;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MARKETING_VERSION = 1.0.426;
|
||||
MARKETING_VERSION = 1.0.446;
|
||||
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 = 426;
|
||||
CURRENT_PROJECT_VERSION = 446;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MARKETING_VERSION = 1.0.426;
|
||||
MARKETING_VERSION = 1.0.446;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = tech.lolli.serverBox.RunnerTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
|
||||
Reference in New Issue
Block a user