mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-15 08:03:09 +02:00
34 lines
573 B
Vue
34 lines
573 B
Vue
<template>
|
|
<div class="root">
|
|
<template v-if="!fetching">
|
|
<p><b>{{ capacity | bytes }}</b>%i18n:max%<b>{{ usage | bytes }}</b>%i18n:in-use%</p>
|
|
</template>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import Vue from 'vue';
|
|
export default Vue.extend({
|
|
data() {
|
|
return {
|
|
fetching: true,
|
|
usage: null,
|
|
capacity: null
|
|
};
|
|
},
|
|
mounted() {
|
|
(this as any).api('drive').then(info => {
|
|
this.capacity = info.capacity;
|
|
this.usage = info.usage;
|
|
this.fetching = false;
|
|
});
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<style lang="stylus" scoped>
|
|
.root
|
|
> p
|
|
> b
|
|
margin 0 8px
|
|
</style>
|