mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
opt.: migrate fl_lib
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
import 'package:fl_lib/fl_lib.dart';
|
||||
import 'package:toolbox/core/extension/context/locale.dart';
|
||||
import 'package:toolbox/core/extension/duration.dart';
|
||||
import 'package:toolbox/core/extension/numx.dart';
|
||||
import 'package:toolbox/core/extension/order.dart';
|
||||
|
||||
enum PveResType {
|
||||
lxc,
|
||||
@@ -132,7 +130,12 @@ final class PveLxc extends PveResIface implements PveCtrlIface {
|
||||
@override
|
||||
String get summary {
|
||||
if (available) {
|
||||
return uptime.secondsToDuration().toStr;
|
||||
return uptime.secondsToDuration().toAgoStr(
|
||||
day: l10n.day,
|
||||
hour: l10n.hour,
|
||||
minute: l10n.minute,
|
||||
second: l10n.second,
|
||||
);
|
||||
}
|
||||
return l10n.stopped;
|
||||
}
|
||||
@@ -210,7 +213,12 @@ final class PveQemu extends PveResIface implements PveCtrlIface {
|
||||
@override
|
||||
String get summary {
|
||||
if (available) {
|
||||
return uptime.secondsToDuration().toStr;
|
||||
return uptime.secondsToDuration().toAgoStr(
|
||||
day: l10n.day,
|
||||
hour: l10n.hour,
|
||||
minute: l10n.minute,
|
||||
second: l10n.second,
|
||||
);
|
||||
}
|
||||
return l10n.stopped;
|
||||
}
|
||||
@@ -260,7 +268,12 @@ final class PveNode extends PveResIface {
|
||||
|
||||
String get topRight {
|
||||
if (isRunning) {
|
||||
return uptime.secondsToDuration().toStr;
|
||||
return uptime.secondsToDuration().toAgoStr(
|
||||
day: l10n.day,
|
||||
hour: l10n.hour,
|
||||
minute: l10n.minute,
|
||||
second: l10n.second,
|
||||
);
|
||||
}
|
||||
return l10n.stopped;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user