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

@@ -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,