aboutsummaryrefslogtreecommitdiff
path: root/src/site/components/statistics/byteUsage.vue
diff options
context:
space:
mode:
authorPitu <[email protected]>2021-01-07 23:02:35 +0900
committerPitu <[email protected]>2021-01-07 23:02:35 +0900
commit5823fa95cd719eb69b14bb45d45f917b6cc46183 (patch)
tree80a02617925a499bccfc7aab7822ed9985b88125 /src/site/components/statistics/byteUsage.vue
parentchore: update sharex snippet to use apiKey instead of jwt (diff)
downloadhost.fuwn.me-5823fa95cd719eb69b14bb45d45f917b6cc46183.tar.xz
host.fuwn.me-5823fa95cd719eb69b14bb45d45f917b6cc46183.zip
feature: Add basic statistics UI
Diffstat (limited to 'src/site/components/statistics/byteUsage.vue')
-rw-r--r--src/site/components/statistics/byteUsage.vue31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/site/components/statistics/byteUsage.vue b/src/site/components/statistics/byteUsage.vue
new file mode 100644
index 0000000..740feff
--- /dev/null
+++ b/src/site/components/statistics/byteUsage.vue
@@ -0,0 +1,31 @@
+<template>
+ <div>
+ <div class="columns">
+ <div class="column is-2">
+ {{ title }}
+ </div>
+ <div class="column">
+ {{ (used / 1024 / 1024 / 1024).toFixed(2) }} GiB /
+ {{ (total / 1024 / 1024 / 1024).toFixed(2) }} GiB ({{ ((used * 100) / total).toFixed(2) }}%)
+ </div>
+ </div>
+ </div>
+</template>
+<script>
+export default {
+ props: {
+ title: {
+ 'type': String,
+ 'default': null
+ },
+ used: {
+ 'type': Number,
+ 'default': null
+ },
+ total: {
+ 'type': Number,
+ 'default': null
+ }
+ }
+};
+</script>