ドライブのファイルの削除を実装

This commit is contained in:
syuilo
2018-06-15 09:53:30 +09:00
parent ad8aa1c179
commit bd827f946a
8 changed files with 98 additions and 39 deletions

View File

@@ -34,15 +34,10 @@
</div>
<div class="menu">
<div>
<a :href="`${file.url}?download`" :download="file.name">
%fa:download%%i18n:@download%
</a>
<button @click="rename">
%fa:pencil-alt%%i18n:@rename%
</button>
<button @click="move">
%fa:R folder-open%%i18n:@move%
</button>
<a :href="`${file.url}?download`" :download="file.name">%fa:download%%i18n:@download%</a>
<button @click="rename">%fa:pencil-alt%%i18n:@rename%</button>
<button @click="move">%fa:R folder-open%%i18n:@move%</button>
<button @click="del">%fa:trash-alt R%%i18n:@delete%</button>
</div>
</div>
<div class="exif" v-show="exif">
@@ -112,6 +107,13 @@ export default Vue.extend({
});
});
},
del() {
(this as any).api('drive/files/delete', {
fileId: this.file.id
}).then(() => {
this.browser.cd(this.file.folderId, true);
});
},
showCreatedAt() {
alert(new Date(this.file.createdAt).toLocaleString());
},