fix(sv): Backups card byte formatter — tenths for GB, MB under 1G
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,10 @@ import { api } from '../../api.js';
|
||||
|
||||
let body, timer;
|
||||
|
||||
const gb = b => (b == null ? '–' : b >= 1e12 ? (b / 1e12).toFixed(1) + 'T' : Math.round(b / 1e9) + 'G');
|
||||
const gb = b => (b == null ? '–'
|
||||
: b >= 1e12 ? (b / 1e12).toFixed(1) + 'T'
|
||||
: b >= 1e9 ? (b / 1e9).toFixed(1) + 'G'
|
||||
: Math.round(b / 1e6) + 'M');
|
||||
function ago(ts) {
|
||||
const s = Math.max(0, (Date.now() - Date.parse(ts)) / 1000);
|
||||
if (s < 3600) return Math.floor(s / 60) + 'm';
|
||||
|
||||
Reference in New Issue
Block a user