fix: disk used text (#268)

This commit is contained in:
lollipopkit
2024-02-02 21:39:38 +08:00
parent a1af24be47
commit 991189dbca
6 changed files with 34 additions and 32 deletions

View File

@@ -89,7 +89,6 @@ class ContainerProvider extends ChangeNotifier {
final lines = psRaw.split('\n');
lines.removeWhere((element) => element.isEmpty);
if (lines.isNotEmpty) lines.removeAt(0);
items = lines.map((e) => ContainerPs.fromRawJson(e, type)).toList();
// Parse docker images

View File

@@ -2,9 +2,9 @@
class BuildData {
static const String name = "ServerBox";
static const int build = 736;
static const int build = 738;
static const String engine = "3.16.9";
static const String buildAt = "2024-02-01 15:39:49";
static const int modifications = 11;
static const int script = 36;
static const String buildAt = "2024-02-02 19:59:49";
static const int modifications = 6;
static const int script = 37;
}

View File

@@ -452,7 +452,7 @@ class _ServerDetailPageState extends State<ServerDetailPage>
Widget _buildDiskItem(Disk disk, ServerStatus ss) {
final (read, write) = ss.diskIO.getSpeed(disk.dev);
final text = () {
final use = '${l10n.used} ${disk.avail.kb2Str} / ${disk.size.kb2Str}';
final use = '${l10n.used} ${disk.used.kb2Str} / ${disk.size.kb2Str}';
if (read == null || write == null) return use;
return '$use\n${l10n.read} $read | ${l10n.write} $write';
}();

View File

@@ -175,10 +175,13 @@ class _ServerEditPageState extends State<ServerEditPage> {
hint: l10n.exampleName,
label: l10n.name,
icon: Icons.info,
obscureText: false,
autoCorrect: true,
suggestiion: true,
),
Input(
controller: _ipController,
type: TextInputType.text,
type: TextInputType.url,
onSubmitted: (_) => _focusScope.requestFocus(_portFocus),
node: _ipFocus,
label: l10n.host,
@@ -205,7 +208,7 @@ class _ServerEditPageState extends State<ServerEditPage> {
),
Input(
controller: _altUrlController,
type: TextInputType.text,
type: TextInputType.url,
node: _alterUrlFocus,
label: l10n.alterUrl,
icon: Icons.computer,