🎛 Adds topbar information drawer

This commit is contained in:
Rune Harlyk
2023-05-14 21:37:54 +02:00
parent 1fa325b861
commit c67caf94c1
2 changed files with 84 additions and 17 deletions
+4
View File
@@ -0,0 +1,4 @@
export const humanFileSize = (size:number):string => {
var i = size == 0 ? 0 : Math.floor(Math.log(size) / Math.log(1024));
return Number((size / Math.pow(1024, i)).toFixed(2)) * 1 + ['B', 'kB', 'MB', 'GB', 'TB'][i];
}