fix(StatusPage): enhance file info display with toggleable font style for last file access
This commit is contained in:
parent
c287de5bad
commit
c7048678b2
|
|
@ -107,6 +107,8 @@ export default function StatusPage({ config, setConfig, onOpenFileManager }: Sta
|
||||||
// Mock image association (replace with real logic if available)
|
// Mock image association (replace with real logic if available)
|
||||||
const imageUrl = lastFile.endsWith('.d64') ? '/assets/floppy.png' : undefined;
|
const imageUrl = lastFile.endsWith('.d64') ? '/assets/floppy.png' : undefined;
|
||||||
|
|
||||||
|
const [useShiftFont, setUseShiftFont] = useState(false);
|
||||||
|
|
||||||
// Dialog/modal state for reset actions
|
// Dialog/modal state for reset actions
|
||||||
const [showResetModal, setShowResetModal] = useState<null | 'meatloaf' | 'host'>(null);
|
const [showResetModal, setShowResetModal] = useState<null | 'meatloaf' | 'host'>(null);
|
||||||
const [resetStatus, setResetStatus] = useState('idle'); // 'idle' | 'in-progress' | 'done'
|
const [resetStatus, setResetStatus] = useState('idle'); // 'idle' | 'in-progress' | 'done'
|
||||||
|
|
@ -210,21 +212,19 @@ export default function StatusPage({ config, setConfig, onOpenFileManager }: Sta
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* New device info cards */}
|
{/* Last File Access + Size + Transfer Speed */}
|
||||||
<div className="mb-4">
|
<div className="mb-4 bg-neutral-50 rounded-lg p-3">
|
||||||
<div className="bg-neutral-50 rounded-lg p-3 flex flex-col items-start justify-center w-full mb-2">
|
|
||||||
<div className="text-xs text-neutral-500 mb-1">Last File Access</div>
|
<div className="text-xs text-neutral-500 mb-1">Last File Access</div>
|
||||||
<div className="text-sm font-medium break-all w-full text-left">{lastFile}</div>
|
<button
|
||||||
</div>
|
onClick={() => setUseShiftFont(v => !v)}
|
||||||
<div className="flex flex-row justify-between gap-4 w-full">
|
className="w-full text-left break-all text-xs font-medium mb-2 leading-snug"
|
||||||
<div className="bg-neutral-50 rounded-lg p-3 flex-1 flex flex-col items-start justify-center">
|
style={{ fontFamily: useShiftFont ? "'CbmShift'" : "'C64_Pro_Mono'" }}
|
||||||
<div className="text-xs text-neutral-500 mb-1">Size</div>
|
>
|
||||||
<div className="text-sm font-medium">{fileSize}</div>
|
{lastFile}
|
||||||
</div>
|
</button>
|
||||||
<div className="bg-neutral-50 rounded-lg p-3 flex-1 flex flex-col items-end justify-center">
|
<div className="flex items-center justify-between">
|
||||||
<div className="text-xs text-neutral-500 mb-1">Transfer Speed</div>
|
<span className="text-xs text-neutral-500">{fileSize}</span>
|
||||||
<div className="text-sm font-medium">{transferSpeed}</div>
|
<span className="text-xs text-neutral-500">{transferSpeed}</span>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user