chore: sync with 4.x webui

This commit is contained in:
Juan Picado @jotadeveloper
2019-03-27 23:39:06 +01:00
parent e2d478d65b
commit 133a5f0171
88 changed files with 1302 additions and 1656 deletions

5
src/utils/file-size.js Normal file
View File

@@ -0,0 +1,5 @@
export default function fileSizeSI(a, b, c, d, e) {
return (b = Math, c = b.log, d = 1e3, e = c(a) / c(d) | 0, a / b.pow(d, e)).toFixed(2)
+ ' ' + (e ? 'kMGTPEZY'[--e] + 'B' : 'Bytes');
};