diff --git a/frontend/src/layouts/modals/Client.vue b/frontend/src/layouts/modals/Client.vue index ba98039..975743f 100644 --- a/frontend/src/layouts/modals/Client.vue +++ b/frontend/src/layouts/modals/Client.vue @@ -38,6 +38,33 @@ + + + + + {{ $t('stats.usage') }}: {{ total }}({{ percent }}%) + + + + {{ $t('reset') }} + + + + + + + + + {{ up }} + / + {{ down }} + + 0 ? v*(1024 ** 3) : 0 } - } + }, + up() :string { return HumanReadable.sizeFormat(this.client.up) }, + down() :string { return HumanReadable.sizeFormat(this.client.down) }, + total() :string { return HumanReadable.sizeFormat(this.client.down + this.client.up) }, + percent() :number { return this.client.volume>0 ? Math.round((this.client.up + this.client.down) *100 / this.client.volume) : 0 }, + percentColor() :string { return (this.client.up+this.client.down) >= this.client.volume ? 'error' : this.percent>90 ? 'warning' : 'success' }, }, watch: { visible(newValue) {