mirror of
https://github.com/filegator/filegator.git
synced 2025-08-14 17:44:23 +02:00
lint tweaks
This commit is contained in:
@@ -39,15 +39,15 @@ const funcs = {
|
||||
return this.$store.getters.hasPermissions(permissions)
|
||||
},
|
||||
formatBytes(bytes, decimals = 2) {
|
||||
if (bytes === 0) return '0 Bytes';
|
||||
if (bytes === 0) return '0 Bytes'
|
||||
|
||||
const k = 1024;
|
||||
const dm = decimals < 0 ? 0 : decimals;
|
||||
const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
|
||||
const k = 1024
|
||||
const dm = decimals < 0 ? 0 : decimals
|
||||
const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']
|
||||
|
||||
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
||||
const i = Math.floor(Math.log(bytes) / Math.log(k))
|
||||
|
||||
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];
|
||||
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i]
|
||||
},
|
||||
formatDate(timestamp) {
|
||||
return moment.unix(timestamp).format('YY/MM/DD hh:mm:ss')
|
||||
|
Reference in New Issue
Block a user