mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-23 12:39:59 +01:00
✌️
This commit is contained in:
parent
d8b1e0034d
commit
44c0758b1a
35
src/web/app/desktop/views/components/settings.drive.vue
Normal file
35
src/web/app/desktop/views/components/settings.drive.vue
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<template>
|
||||||
|
<div class="root">
|
||||||
|
<template v-if="!fetching">
|
||||||
|
<el-progress :text-inside="true" :stroke-width="18" :percentage="Math.floor((usage / capacity) * 100)"/>
|
||||||
|
<p><b>{{ capacity | bytes }}</b>中<b>{{ usage | bytes }}</b>使用中</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>
|
@ -71,7 +71,7 @@
|
|||||||
|
|
||||||
<section class="drive" v-show="page == 'drive'">
|
<section class="drive" v-show="page == 'drive'">
|
||||||
<h1>%i18n:desktop.tags.mk-settings.drive%</h1>
|
<h1>%i18n:desktop.tags.mk-settings.drive%</h1>
|
||||||
<mk-drive-setting/>
|
<x-drive/>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="mute" v-show="page == 'mute'">
|
<section class="mute" v-show="page == 'mute'">
|
||||||
@ -163,6 +163,7 @@ import X2fa from './settings.2fa.vue';
|
|||||||
import XApi from './settings.api.vue';
|
import XApi from './settings.api.vue';
|
||||||
import XApps from './settings.apps.vue';
|
import XApps from './settings.apps.vue';
|
||||||
import XSignins from './settings.signins.vue';
|
import XSignins from './settings.signins.vue';
|
||||||
|
import XDrive from './settings.drive.vue';
|
||||||
import { docsUrl, license, lang, version } from '../../../config';
|
import { docsUrl, license, lang, version } from '../../../config';
|
||||||
import checkForUpdate from '../../../common/scripts/check-for-update';
|
import checkForUpdate from '../../../common/scripts/check-for-update';
|
||||||
|
|
||||||
@ -174,7 +175,8 @@ export default Vue.extend({
|
|||||||
X2fa,
|
X2fa,
|
||||||
XApi,
|
XApi,
|
||||||
XApps,
|
XApps,
|
||||||
XSignins
|
XSignins,
|
||||||
|
XDrive
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
Loading…
Reference in New Issue
Block a user