mirror of
https://github.com/olehomelchenko/astrolabe-nvc.git
synced 2025-12-21 21:22:23 +00:00
refactor: utilities function
This commit is contained in:
@@ -796,13 +796,6 @@ function calculateStorageUsage() {
|
||||
return new Blob([snippetsData]).size;
|
||||
}
|
||||
|
||||
// Format bytes to human-readable size
|
||||
function formatBytes(bytes) {
|
||||
if (bytes < 1024) return `${bytes} B`;
|
||||
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
|
||||
return `${(bytes / (1024 * 1024)).toFixed(2)} MB`;
|
||||
}
|
||||
|
||||
// Update storage monitor display
|
||||
function updateStorageMonitor() {
|
||||
const usedBytes = calculateStorageUsage();
|
||||
|
||||
Reference in New Issue
Block a user