diff options
Diffstat (limited to 'src/client/app/common/views/components/note-menu.vue')
| -rw-r--r-- | src/client/app/common/views/components/note-menu.vue | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/client/app/common/views/components/note-menu.vue b/src/client/app/common/views/components/note-menu.vue index fb95055049..a400610a2b 100644 --- a/src/client/app/common/views/components/note-menu.vue +++ b/src/client/app/common/views/components/note-menu.vue @@ -4,6 +4,7 @@ <div class="popover" :class="{ compact }" ref="popover"> <button @click="favorite">%i18n:@favorite%</button> <button v-if="note.userId == $store.state.i.id" @click="pin">%i18n:@pin%</button> + <button v-if="note.userId == $store.state.i.id" @click="del">%i18n:@delete%</button> <a v-if="note.uri" :href="note.uri" target="_blank">%i18n:@remote%</a> </div> </div> @@ -59,6 +60,15 @@ export default Vue.extend({ }); }, + del() { + if (!window.confirm('%i18n:@delete-confirm%')) return; + (this as any).api('notes/delete', { + noteId: this.note.id + }).then(() => { + this.$destroy(); + }); + }, + favorite() { (this as any).api('notes/favorites/create', { noteId: this.note.id |