new: docker icon

This commit is contained in:
lollipopkit
2024-03-20 14:24:05 +08:00
parent cedade1d01
commit d5ce11c788
10 changed files with 111 additions and 44 deletions

2
.gitignore vendored
View File

@@ -56,7 +56,7 @@ test.dart
.dart_tool
# Linux release
ServerBox.AppDir
linux.AppDir
ServerBox-x86_64.AppImage
untranlated.json

View File

@@ -660,7 +660,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 811;
CURRENT_PROJECT_VERSION = 817;
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
@@ -670,7 +670,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.811;
MARKETING_VERSION = 1.0.817;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@@ -796,7 +796,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 811;
CURRENT_PROJECT_VERSION = 817;
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
@@ -806,7 +806,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.811;
MARKETING_VERSION = 1.0.817;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@@ -824,7 +824,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 811;
CURRENT_PROJECT_VERSION = 817;
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
@@ -834,7 +834,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.811;
MARKETING_VERSION = 1.0.817;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@@ -855,7 +855,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 811;
CURRENT_PROJECT_VERSION = 817;
DEVELOPMENT_TEAM = BA88US33G6;
GCC_C_LANGUAGE_STANDARD = gnu11;
GENERATE_INFOPLIST_FILE = YES;
@@ -868,7 +868,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0.811;
MARKETING_VERSION = 1.0.817;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget;
@@ -894,7 +894,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 811;
CURRENT_PROJECT_VERSION = 817;
DEVELOPMENT_TEAM = BA88US33G6;
GCC_C_LANGUAGE_STANDARD = gnu11;
GENERATE_INFOPLIST_FILE = YES;
@@ -907,7 +907,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0.811;
MARKETING_VERSION = 1.0.817;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -930,7 +930,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 811;
CURRENT_PROJECT_VERSION = 817;
DEVELOPMENT_TEAM = BA88US33G6;
GCC_C_LANGUAGE_STANDARD = gnu11;
GENERATE_INFOPLIST_FILE = YES;
@@ -943,7 +943,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0.811;
MARKETING_VERSION = 1.0.817;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -966,7 +966,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 811;
CURRENT_PROJECT_VERSION = 817;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_PREVIEWS = YES;
@@ -978,7 +978,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.811;
MARKETING_VERSION = 1.0.817;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.WatchEnd;
@@ -1007,7 +1007,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 811;
CURRENT_PROJECT_VERSION = 817;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_PREVIEWS = YES;
@@ -1019,7 +1019,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.811;
MARKETING_VERSION = 1.0.817;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.WatchEnd;
PRODUCT_NAME = ServerBox;
@@ -1045,7 +1045,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 811;
CURRENT_PROJECT_VERSION = 817;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_PREVIEWS = YES;
@@ -1057,7 +1057,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.811;
MARKETING_VERSION = 1.0.817;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.WatchEnd;
PRODUCT_NAME = ServerBox;

View File

@@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:hive_flutter/hive_flutter.dart';
import 'package:icons_plus/icons_plus.dart';
import 'package:toolbox/core/extension/context/locale.dart';
part 'server_func.g.dart';
@@ -24,15 +25,25 @@ enum ServerFuncBtn {
pve,
;
IconData get icon => switch (this) {
sftp => Icons.insert_drive_file,
snippet => Icons.code,
pkg => Icons.system_security_update,
container => Icons.view_agenda,
process => Icons.list_alt_outlined,
terminal => Icons.terminal,
iperf => Icons.speed,
pve => Icons.computer,
static const defaultFuncs = [
terminal,
sftp,
container,
process,
pkg,
snippet,
pve,
];
Icon get icon => switch (this) {
sftp => const Icon(Icons.insert_drive_file, size: 15),
snippet => const Icon(Icons.code, size: 15),
pkg => const Icon(Icons.system_security_update, size: 15),
container => const Icon(FontAwesome.docker_brand, size: 14),
process => const Icon(Icons.list_alt_outlined, size: 15),
terminal => const Icon(Icons.terminal, size: 15),
iperf => const Icon(Icons.speed, size: 15),
pve => const Icon(FontAwesome.server_solid, size: 13),
};
String get toStr => switch (this) {

View File

@@ -102,7 +102,8 @@ final class PveProvider extends ChangeNotifier {
try {
final resp = await session.get('$addr/api2/json/cluster/resources');
final res = resp.data['data'] as List;
final result = await Computer.shared.start(PveRes.parse, (res, data.value));
final result =
await Computer.shared.start(PveRes.parse, (res, data.value));
data.value = result;
} catch (e) {
Loggers.app.warning('PVE list failed', e);

View File

@@ -2,9 +2,9 @@
class BuildData {
static const String name = "ServerBox";
static const int build = 811;
static const int build = 817;
static const String engine = "3.19.3";
static const String buildAt = "2024-03-16 16:31:54";
static const int modifications = 6;
static const String buildAt = "2024-03-19 16:44:04";
static const int modifications = 4;
static const int script = 41;
}

View File

@@ -116,7 +116,7 @@ class _ServerDetailPageState extends State<ServerDetailPage>
itemCount: buildFuncs ? _cardsOrder.length + 1 : _cardsOrder.length,
itemBuilder: (context, index) {
if (index == 0 && buildFuncs) {
return ServerFuncBtns(spi: widget.spi, iconSize: 19);
return ServerFuncBtns(spi: widget.spi);
}
if (buildFuncs) index--;
return _cardBuildMap[_cardsOrder[index]]?.call(si.status);

View File

@@ -41,7 +41,7 @@ class ServerFuncBtnsTopRight extends StatelessWidget {
value: e,
child: Row(
children: [
Icon(e.icon),
e.icon,
const SizedBox(
width: 10,
),
@@ -60,11 +60,9 @@ class ServerFuncBtns extends StatelessWidget {
const ServerFuncBtns({
super.key,
required this.spi,
this.iconSize,
});
final ServerPrivateInfo spi;
final double? iconSize;
@override
Widget build(BuildContext context) {
@@ -86,7 +84,7 @@ class ServerFuncBtns extends StatelessWidget {
onPressed: () => _onTapMoreBtns(e, spi, context),
padding: EdgeInsets.zero,
tooltip: e.toStr,
icon: Icon(e.icon, size: iconSize ?? 15),
icon: e.icon,
)
: Padding(
padding: const EdgeInsets.only(bottom: 13),
@@ -96,7 +94,7 @@ class ServerFuncBtns extends StatelessWidget {
IconButton(
onPressed: () => _onTapMoreBtns(e, spi, context),
padding: EdgeInsets.zero,
icon: Icon(e.icon, size: iconSize ?? 15),
icon: e.icon,
),
Text(e.toStr, style: UIs.text11Grey)
],

View File

@@ -467,7 +467,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 811;
CURRENT_PROJECT_VERSION = 817;
DEVELOPMENT_TEAM = BA88US33G6;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "Server Box";
@@ -477,7 +477,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 1.0.811;
MARKETING_VERSION = 1.0.817;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
PRODUCT_NAME = "Server Box";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -604,7 +604,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 811;
CURRENT_PROJECT_VERSION = 817;
DEVELOPMENT_TEAM = BA88US33G6;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "Server Box";
@@ -614,7 +614,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 1.0.811;
MARKETING_VERSION = 1.0.817;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
PRODUCT_NAME = "Server Box";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -634,7 +634,7 @@
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "3rd Party Mac Developer Application";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 811;
CURRENT_PROJECT_VERSION = 817;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=macosx*]" = BA88US33G6;
INFOPLIST_FILE = Runner/Info.plist;
@@ -645,7 +645,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 1.0.811;
MARKETING_VERSION = 1.0.817;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
PRODUCT_NAME = "Server Box";
PROVISIONING_PROFILE_SPECIFIER = "";

View File

@@ -429,6 +429,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.17"
flutter_svg:
dependency: transitive
description:
name: flutter_svg
sha256: "7b4ca6cf3304575fe9c8ec64813c8d02ee41d2afe60bcfe0678bcb5375d596a2"
url: "https://pub.dev"
source: hosted
version: "2.0.10+1"
flutter_test:
dependency: "direct dev"
description: flutter
@@ -511,6 +519,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.15.4"
http:
dependency: transitive
description:
name: http
sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba
url: "https://pub.dev"
source: hosted
version: "1.2.0"
http_multi_server:
dependency: transitive
description:
@@ -535,6 +551,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.2.0"
icons_plus:
dependency: "direct main"
description:
name: icons_plus
sha256: "8e2f601b8605d45dd55b106a0da084a1809125077a49574ca22e8bcd5b6e86f0"
url: "https://pub.dev"
source: hosted
version: "5.0.0"
image:
dependency: transitive
description:
@@ -727,6 +751,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.9.0"
path_parsing:
dependency: transitive
description:
name: path_parsing
sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf
url: "https://pub.dev"
source: hosted
version: "1.0.1"
path_provider:
dependency: "direct main"
description:
@@ -1156,6 +1188,30 @@ packages:
url: "https://pub.dev"
source: hosted
version: "4.3.3"
vector_graphics:
dependency: transitive
description:
name: vector_graphics
sha256: "32c3c684e02f9bc0afb0ae0aa653337a2fe022e8ab064bcd7ffda27a74e288e3"
url: "https://pub.dev"
source: hosted
version: "1.1.11+1"
vector_graphics_codec:
dependency: transitive
description:
name: vector_graphics_codec
sha256: c86987475f162fadff579e7320c7ddda04cd2fdeffbe1129227a85d9ac9e03da
url: "https://pub.dev"
source: hosted
version: "1.1.11+1"
vector_graphics_compiler:
dependency: transitive
description:
name: vector_graphics_compiler
sha256: "12faff3f73b1741a36ca7e31b292ddeb629af819ca9efe9953b70bd63fc8cd81"
url: "https://pub.dev"
source: hosted
version: "1.1.11+1"
vector_math:
dependency: transitive
description:

View File

@@ -72,6 +72,7 @@ dependencies:
ref: master
url: https://github.com/lollipopkit/dart_computer
flutter_background_service: ^5.0.5
icons_plus: ^5.0.0
dev_dependencies:
flutter_native_splash: ^2.1.6