mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
增加 armbian 头图
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
<!-- Badges-->
|
||||
<p align="center">
|
||||
<a href="https://apps.apple.com/app/serverbox-status-tools/id1586449703">
|
||||
<a href="https://apps.apple.com/app/id1586449703">
|
||||
<img style="height: 37px" src="screenshots/appstore.svg">
|
||||
</a>
|
||||
<a href="https://github.com/LollipopKit/flutter_server_box/releases/latest">
|
||||
|
||||
BIN
assets/linux/armbian.png
Normal file
BIN
assets/linux/armbian.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.1 KiB |
@@ -354,7 +354,7 @@
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = 153;
|
||||
CURRENT_PROJECT_VERSION = 155;
|
||||
DEVELOPMENT_TEAM = BA88US33G6;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
@@ -362,7 +362,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0.153;
|
||||
MARKETING_VERSION = 1.0.155;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
@@ -484,7 +484,7 @@
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = 153;
|
||||
CURRENT_PROJECT_VERSION = 155;
|
||||
DEVELOPMENT_TEAM = BA88US33G6;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
@@ -492,7 +492,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0.153;
|
||||
MARKETING_VERSION = 1.0.155;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
@@ -508,7 +508,7 @@
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = 153;
|
||||
CURRENT_PROJECT_VERSION = 155;
|
||||
DEVELOPMENT_TEAM = BA88US33G6;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
@@ -516,7 +516,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0.153;
|
||||
MARKETING_VERSION = 1.0.155;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
|
||||
@@ -11,14 +11,14 @@ import 'package:toolbox/data/service/app.dart';
|
||||
import 'package:toolbox/generated/l10n.dart';
|
||||
import 'package:toolbox/locator.dart';
|
||||
|
||||
final logger = Logger('UPDATE');
|
||||
final _logger = Logger('UPDATE');
|
||||
|
||||
Future<bool> isFileAvailable(String url) async {
|
||||
try {
|
||||
final resp = await Dio().head(url);
|
||||
return resp.statusCode == 200;
|
||||
} catch (e) {
|
||||
logger.warning('update file not available: $e');
|
||||
_logger.warning('update file not available: $e');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -40,11 +40,11 @@ Future<void> doUpdate(BuildContext context, {bool force = false}) async {
|
||||
}();
|
||||
|
||||
if (!force && newest <= BuildData.build) {
|
||||
logger.info('Update ignored due to current: ${BuildData.build}, '
|
||||
_logger.info('Update ignored due to current: ${BuildData.build}, '
|
||||
'update: $newest');
|
||||
return;
|
||||
}
|
||||
logger.info('Update available: $newest');
|
||||
_logger.info('Update available: $newest');
|
||||
|
||||
if (Platform.isAndroid && !await isFileAvailable(update.android)) {
|
||||
return;
|
||||
|
||||
@@ -9,8 +9,10 @@ const debianDistList = [
|
||||
'ubuntu',
|
||||
'linuxmint',
|
||||
'elementary',
|
||||
'raspbian'
|
||||
'raspbian',
|
||||
'armbian'
|
||||
];
|
||||
|
||||
const rehlDistList = [
|
||||
'redhat',
|
||||
'fedora',
|
||||
|
||||
@@ -1,53 +1,53 @@
|
||||
import 'package:toolbox/data/model/server/cpu_status.dart';
|
||||
|
||||
class Cpu2Status {
|
||||
List<CpuStatus> pre;
|
||||
List<CpuStatus> now;
|
||||
List<CpuStatus> _pre;
|
||||
List<CpuStatus> _now;
|
||||
String temp;
|
||||
Cpu2Status(this.pre, this.now, this.temp);
|
||||
Cpu2Status(this._pre, this._now, this.temp);
|
||||
|
||||
double usedPercent({int coreIdx = 0}) {
|
||||
if (now.length != pre.length) return 0;
|
||||
final idleDelta = now[coreIdx].idle - pre[coreIdx].idle;
|
||||
final totalDelta = now[coreIdx].total - pre[coreIdx].total;
|
||||
if (_now.length != _pre.length) return 0;
|
||||
final idleDelta = _now[coreIdx].idle - _pre[coreIdx].idle;
|
||||
final totalDelta = _now[coreIdx].total - _pre[coreIdx].total;
|
||||
final used = idleDelta / totalDelta;
|
||||
return used.isNaN ? 0 : 100 - used * 100;
|
||||
}
|
||||
|
||||
void update(List<CpuStatus> newStatus, String newTemp) {
|
||||
pre = now;
|
||||
now = newStatus;
|
||||
_pre = _now;
|
||||
_now = newStatus;
|
||||
temp = newTemp;
|
||||
}
|
||||
|
||||
int get coresCount => now.length;
|
||||
int get coresCount => _now.length;
|
||||
|
||||
int get totalDelta => now[0].total - pre[0].total;
|
||||
int get totalDelta => _now[0].total - _pre[0].total;
|
||||
|
||||
double get user {
|
||||
if (now.length != pre.length) return 0;
|
||||
final delta = now[0].user - pre[0].user;
|
||||
if (_now.length != _pre.length) return 0;
|
||||
final delta = _now[0].user - _pre[0].user;
|
||||
final used = delta / totalDelta;
|
||||
return used.isNaN ? 0 : used * 100;
|
||||
}
|
||||
|
||||
double get sys {
|
||||
if (now.length != pre.length) return 0;
|
||||
final delta = now[0].sys - pre[0].sys;
|
||||
if (_now.length != _pre.length) return 0;
|
||||
final delta = _now[0].sys - _pre[0].sys;
|
||||
final used = delta / totalDelta;
|
||||
return used.isNaN ? 0 : used * 100;
|
||||
}
|
||||
|
||||
double get nice {
|
||||
if (now.length != pre.length) return 0;
|
||||
final delta = now[0].nice - pre[0].nice;
|
||||
if (_now.length != _pre.length) return 0;
|
||||
final delta = _now[0].nice - _pre[0].nice;
|
||||
final used = delta / totalDelta;
|
||||
return used.isNaN ? 0 : used * 100;
|
||||
}
|
||||
|
||||
double get iowait {
|
||||
if (now.length != pre.length) return 0;
|
||||
final delta = now[0].iowait - pre[0].iowait;
|
||||
if (_now.length != _pre.length) return 0;
|
||||
final delta = _now[0].iowait - _pre[0].iowait;
|
||||
final used = delta / totalDelta;
|
||||
return used.isNaN ? 0 : used * 100;
|
||||
}
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
class LinuxIcons {
|
||||
List<String> db;
|
||||
|
||||
LinuxIcons(this.db);
|
||||
|
||||
String? search(String sysVer) {
|
||||
for (var item in db) {
|
||||
if (sysVer.toLowerCase().contains(item)) {
|
||||
return 'assets/linux/$item.png';
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -9,46 +9,46 @@ class NetSpeedPart {
|
||||
}
|
||||
|
||||
class NetSpeed {
|
||||
List<NetSpeedPart> old;
|
||||
List<NetSpeedPart> now;
|
||||
NetSpeed(this.old, this.now);
|
||||
List<NetSpeedPart> _old;
|
||||
List<NetSpeedPart> _now;
|
||||
NetSpeed(this._old, this._now);
|
||||
|
||||
List<String> get devices {
|
||||
final devices = <String>[];
|
||||
for (var item in now) {
|
||||
for (var item in _now) {
|
||||
devices.add(item.device);
|
||||
}
|
||||
return devices;
|
||||
}
|
||||
|
||||
void update(List<NetSpeedPart> newOne) {
|
||||
old = now;
|
||||
now = newOne;
|
||||
_old = _now;
|
||||
_now = newOne;
|
||||
}
|
||||
|
||||
int get timeDiff => now[0].time - old[0].time;
|
||||
int get timeDiff => _now[0].time - _old[0].time;
|
||||
|
||||
String speedIn({String? device}) {
|
||||
if (old[0].device == '' || now[0].device == '') return '0kb/s';
|
||||
if (_old[0].device == '' || _now[0].device == '') return '0kb/s';
|
||||
final idx = deviceIdx(device);
|
||||
final speedInBytesPerSecond =
|
||||
(now[idx].bytesIn - old[idx].bytesIn) / timeDiff;
|
||||
(_now[idx].bytesIn - _old[idx].bytesIn) / timeDiff;
|
||||
return buildStandardOutput(speedInBytesPerSecond);
|
||||
}
|
||||
|
||||
String speedOut({String? device}) {
|
||||
if (old[0].device == '' || now[0].device == '') return '0kb/s';
|
||||
if (_old[0].device == '' || _now[0].device == '') return '0kb/s';
|
||||
final idx = deviceIdx(device);
|
||||
final speedOutBytesPerSecond =
|
||||
(now[idx].bytesOut - old[idx].bytesOut) / timeDiff;
|
||||
(_now[idx].bytesOut - _old[idx].bytesOut) / timeDiff;
|
||||
return buildStandardOutput(speedOutBytesPerSecond);
|
||||
}
|
||||
|
||||
int deviceIdx(String? device) {
|
||||
if (device != null) {
|
||||
for (var item in now) {
|
||||
for (var item in _now) {
|
||||
if (item.device == device) {
|
||||
return now.indexOf(item);
|
||||
return _now.indexOf(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
class BuildData {
|
||||
static const String name = "ServerBox";
|
||||
static const int build = 154;
|
||||
static const int build = 155;
|
||||
static const String engine =
|
||||
"Flutter 3.3.4 • channel stable • https://github.com/flutter/flutter.git\nFramework • revision eb6d86ee27 (2 weeks ago) • 2022-10-04 22:31:45 -0700\nEngine • revision c08d7d5efc\nTools • Dart 2.18.2 • DevTools 2.15.0\n";
|
||||
static const String buildAt = "2022-10-21 17:29:42.809139";
|
||||
static const int modifications = 9;
|
||||
"Flutter 3.3.4 • channel stable • https://github.com/flutter/flutter.git\nFramework • revision eb6d86ee27 (4 weeks ago) • 2022-10-04 22:31:45 -0700\nEngine • revision c08d7d5efc\nTools • Dart 2.18.2 • DevTools 2.15.0\n";
|
||||
static const String buildAt = "2022-11-05 21:49:47.105329";
|
||||
static const int modifications = 0;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import 'package:toolbox/data/model/server/linux_icon.dart';
|
||||
|
||||
final linuxIcons = LinuxIcons([
|
||||
'ubuntu',
|
||||
'arch',
|
||||
@@ -8,5 +6,21 @@ final linuxIcons = LinuxIcons([
|
||||
'fedora',
|
||||
'opensuse',
|
||||
'kali',
|
||||
'wrt'
|
||||
'wrt',
|
||||
'armbian'
|
||||
]);
|
||||
|
||||
class LinuxIcons {
|
||||
List<String> db;
|
||||
|
||||
LinuxIcons(this.db);
|
||||
|
||||
String? search(String sysVer) {
|
||||
for (var item in db) {
|
||||
if (sysVer.toLowerCase().contains(item)) {
|
||||
return 'assets/linux/$item.png';
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -420,14 +420,14 @@
|
||||
CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 153;
|
||||
CURRENT_PROJECT_VERSION = 155;
|
||||
DEVELOPMENT_TEAM = BA88US33G6;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0.153;
|
||||
MARKETING_VERSION = 1.0.155;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_VERSION = 5.0;
|
||||
@@ -550,14 +550,14 @@
|
||||
CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 153;
|
||||
CURRENT_PROJECT_VERSION = 155;
|
||||
DEVELOPMENT_TEAM = BA88US33G6;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0.153;
|
||||
MARKETING_VERSION = 1.0.155;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
@@ -574,14 +574,14 @@
|
||||
CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 153;
|
||||
CURRENT_PROJECT_VERSION = 155;
|
||||
DEVELOPMENT_TEAM = BA88US33G6;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0.153;
|
||||
MARKETING_VERSION = 1.0.155;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_VERSION = 5.0;
|
||||
|
||||
@@ -94,6 +94,7 @@ flutter:
|
||||
- assets/linux/fedora.png
|
||||
- assets/linux/opensuse.png
|
||||
- assets/linux/wrt.png
|
||||
- assets/linux/armbian.png
|
||||
# - images/a_dot_burr.jpeg
|
||||
# - images/a_dot_ham.jpeg
|
||||
# An image asset can refer to one or more resolution-specific "variants", see
|
||||
|
||||
Reference in New Issue
Block a user