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

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;
}