Improve admin dashboard

This commit is contained in:
syuilo
2018-11-03 11:38:00 +09:00
parent f9f2ca51ac
commit aadd5b95b8
10 changed files with 183 additions and 8 deletions

View File

@ -1,6 +1,7 @@
import Vue from 'vue';
Vue.filter('bytes', (v, digits = 0) => {
if (v == null) return '?';
const sizes = ['B', 'KB', 'MB', 'GB', 'TB'];
if (v == 0) return '0';
const isMinus = v < 0;

View File

@ -1,5 +1,6 @@
import Vue from 'vue';
Vue.filter('number', (n) => {
if (n == null) return 'N/A';
return n.toLocaleString();
});