mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
opt.
This commit is contained in:
@@ -130,12 +130,7 @@ final class PveLxc extends PveResIface implements PveCtrlIface {
|
||||
@override
|
||||
String get summary {
|
||||
if (available) {
|
||||
return uptime.secondsToDuration().toAgoStr(
|
||||
day: l10n.day,
|
||||
hour: l10n.hour,
|
||||
minute: l10n.minute,
|
||||
second: l10n.second,
|
||||
);
|
||||
return uptime.secondsToDuration().toAgoStr;
|
||||
}
|
||||
return l10n.stopped;
|
||||
}
|
||||
@@ -213,12 +208,7 @@ final class PveQemu extends PveResIface implements PveCtrlIface {
|
||||
@override
|
||||
String get summary {
|
||||
if (available) {
|
||||
return uptime.secondsToDuration().toAgoStr(
|
||||
day: l10n.day,
|
||||
hour: l10n.hour,
|
||||
minute: l10n.minute,
|
||||
second: l10n.second,
|
||||
);
|
||||
return uptime.secondsToDuration().toAgoStr;
|
||||
}
|
||||
return l10n.stopped;
|
||||
}
|
||||
@@ -268,12 +258,7 @@ final class PveNode extends PveResIface {
|
||||
|
||||
String get topRight {
|
||||
if (isRunning) {
|
||||
return uptime.secondsToDuration().toAgoStr(
|
||||
day: l10n.day,
|
||||
hour: l10n.hour,
|
||||
minute: l10n.minute,
|
||||
second: l10n.second,
|
||||
);
|
||||
return uptime.secondsToDuration().toAgoStr;
|
||||
}
|
||||
return l10n.stopped;
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ final class WakeOnLanCfg {
|
||||
return (err, valid);
|
||||
}
|
||||
|
||||
Future<void> wake() async {
|
||||
Future<void> wake() {
|
||||
if (!validate().$2) {
|
||||
throw Exception('Invalid WakeOnLanCfg');
|
||||
}
|
||||
@@ -48,7 +48,7 @@ final class WakeOnLanCfg {
|
||||
final mac_ = MACAddress(mac);
|
||||
final pwd_ = pwd != null ? SecureONPassword(pwd!) : null;
|
||||
final obj = WakeOnLAN(ip_, mac_, password: pwd_);
|
||||
await obj.wake(
|
||||
return obj.wake(
|
||||
repeat: 3,
|
||||
repeatDelay: const Duration(milliseconds: 500),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user