feat(accounts): highlight negative disk usage with recalculate hint

This commit is contained in:
Steven RYDELL
2026-07-30 19:54:46 +02:00
parent 1ab574a42a
commit 0dec14c3f8
7 changed files with 106 additions and 16 deletions
+6 -2
View File
@@ -29,13 +29,13 @@ import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '@/component
import { ExpressionEditor } from '@/components/expression/ExpressionEditor';
import { OtpAuthField } from '@/components/forms/OtpAuthField';
import { SizeDisplay } from '@/components/common/SizeDisplay';
import {
bytesToHuman,
humanToBytes,
msToHuman,
humanToMs,
formatSize,
formatDuration,
SIZE_UNITS,
DURATION_UNITS,
@@ -651,7 +651,11 @@ function SizeInput({ value, onChange, readOnly, nullable }: SizeInputProps) {
if (readOnly) {
if (value == null)
return <span className="text-sm text-muted-foreground italic">{t('field.notSet', 'Not set')}</span>;
return <span className="text-sm">{formatSize(value as number)}</span>;
return (
<span className="text-sm">
<SizeDisplay bytes={value as number} />
</span>
);
}
return <SizeInputEditable value={value} onChange={onChange} nullable={nullable} />;
}