diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2019-05-27 16:54:47 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2019-05-27 16:54:47 +0900 |
| commit | 72fb23f4d51db1b999a10b7d8bb50293a81af163 (patch) | |
| tree | 07a7fa62cb7a822ce3759db5b2035368cd4e8e29 /src/client/app/admin/views | |
| parent | Improve post form (diff) | |
| download | misskey-72fb23f4d51db1b999a10b7d8bb50293a81af163.tar.gz misskey-72fb23f4d51db1b999a10b7d8bb50293a81af163.tar.bz2 misskey-72fb23f4d51db1b999a10b7d8bb50293a81af163.zip | |
Improve drive management
Diffstat (limited to 'src/client/app/admin/views')
| -rw-r--r-- | src/client/app/admin/views/drive.vue | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/client/app/admin/views/drive.vue b/src/client/app/admin/views/drive.vue index 22b3b7eb96..1152db2b91 100644 --- a/src/client/app/admin/views/drive.vue +++ b/src/client/app/admin/views/drive.vue @@ -14,6 +14,10 @@ <ui-button @click="show()"><fa :icon="faSearch"/> {{ $t('lookup') }}</ui-button> <ui-textarea v-if="file" :value="file | json5" readonly tall style="margin-top:16px;"></ui-textarea> </section> + <section> + <ui-button @click="cleanUp()"><fa :icon="faTrashAlt"/> {{ $t('clean-up') }}</ui-button> + <ui-button @click="cleanRemoteFiles()"><fa :icon="faTrashAlt"/> {{ $t('clean-remote-files') }}</ui-button> + </section> </ui-card> <ui-card> @@ -227,6 +231,29 @@ export default Vue.extend({ }); }); }, + + cleanRemoteFiles() { + this.$root.dialog({ + type: 'warning', + text: this.$t('clean-remote-files-are-you-sure'), + showCancelButton: true + }).then(({ canceled }) => { + if (canceled) return; + this.$root.api('admin/drive/clean-remote-files'); + this.$root.dialog({ + type: 'success', + splash: true + }); + }); + }, + + cleanUp() { + this.$root.api('admin/drive/cleanup'); + this.$root.dialog({ + type: 'success', + splash: true + }); + } } }); </script> |