mirror of
https://github.com/paricafe/misskey.git
synced 2024-11-25 08:26:43 -06:00
* Fix #5798 * clean * Update src/client/components/post-form-attaches.vue Co-Authored-By: Satsuki Yanagi <17376330+u1-liquid@users.noreply.github.com> * nest Co-authored-by: Satsuki Yanagi <17376330+u1-liquid@users.noreply.github.com>
This commit is contained in:
parent
3ae73555a9
commit
aade954dd7
1 changed files with 6 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="skeikyzd" v-show="files.length != 0">
|
||||
<x-draggable class="files" :list="files" animation="150">
|
||||
<x-draggable class="files" :list="files" animation="150" delay="100" delayOnTouchOnly="true">
|
||||
<div v-for="file in files" :key="file.id" @click="showFileMenu(file, $event)" @contextmenu.prevent="showFileMenu(file, $event)">
|
||||
<x-file-thumbnail :data-id="file.id" class="thumbnail" :file="file" fit="cover"/>
|
||||
<div class="sensitive" v-if="file.isSensitive">
|
||||
|
@ -41,6 +41,8 @@ export default Vue.extend({
|
|||
|
||||
data() {
|
||||
return {
|
||||
menu: null as Promise<null> | null,
|
||||
|
||||
faExclamationTriangle
|
||||
};
|
||||
},
|
||||
|
@ -80,7 +82,8 @@ export default Vue.extend({
|
|||
});
|
||||
},
|
||||
showFileMenu(file, ev: MouseEvent) {
|
||||
this.$root.menu({
|
||||
if (this.menu) return;
|
||||
this.menu = this.$root.menu({
|
||||
items: [{
|
||||
text: this.$t('renameFile'),
|
||||
icon: faICursor,
|
||||
|
@ -95,7 +98,7 @@ export default Vue.extend({
|
|||
action: () => { this.detachMedia(file.id) }
|
||||
}],
|
||||
source: ev.currentTarget || ev.target
|
||||
});
|
||||
}).then(() => this.menu = null);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue