diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2020-03-22 10:59:27 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2020-03-22 10:59:27 +0900 |
| commit | 7f0084a7ede7a3950ea6bdaeadd744f602d010cf (patch) | |
| tree | e339d8002b094f18dccabf364479aaab056ee0dd /src/client/components/note.vue | |
| parent | Merge branch 'develop' (diff) | |
| parent | 12.23.0 (diff) | |
| download | misskey-7f0084a7ede7a3950ea6bdaeadd744f602d010cf.tar.gz misskey-7f0084a7ede7a3950ea6bdaeadd744f602d010cf.tar.bz2 misskey-7f0084a7ede7a3950ea6bdaeadd744f602d010cf.zip | |
Merge branch 'develop'
Diffstat (limited to 'src/client/components/note.vue')
| -rw-r--r-- | src/client/components/note.vue | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/src/client/components/note.vue b/src/client/components/note.vue index db669309d3..b3126e0673 100644 --- a/src/client/components/note.vue +++ b/src/client/components/note.vue @@ -86,7 +86,7 @@ <script lang="ts"> import Vue from 'vue'; import { faBolt, faTimes, faBullhorn, faStar, faLink, faExternalLinkSquareAlt, faPlus, faMinus, faRetweet, faReply, faReplyAll, faEllipsisH, faHome, faUnlock, faEnvelope, faThumbtack, faBan, faQuoteRight, faInfoCircle } from '@fortawesome/free-solid-svg-icons'; -import { faCopy, faTrashAlt, faEye, faEyeSlash } from '@fortawesome/free-regular-svg-icons'; +import { faCopy, faTrashAlt, faEdit, faEye, faEyeSlash } from '@fortawesome/free-regular-svg-icons'; import { parse } from '../../mfm/parse'; import { sum, unique } from '../../prelude/array'; import i18n from '../i18n'; @@ -142,7 +142,7 @@ export default Vue.extend({ replies: [], showContent: false, hideThisNote: false, - faBolt, faTimes, faBullhorn, faPlus, faMinus, faRetweet, faReply, faReplyAll, faEllipsisH, faHome, faUnlock, faEnvelope, faThumbtack, faBan + faEdit, faBolt, faTimes, faBullhorn, faPlus, faMinus, faRetweet, faReply, faReplyAll, faEllipsisH, faHome, faUnlock, faEnvelope, faThumbtack, faBan }; }, @@ -460,6 +460,22 @@ export default Vue.extend({ }); }, + delEdit() { + this.$root.dialog({ + type: 'warning', + text: this.$t('deleteAndEditConfirm'), + showCancelButton: true + }).then(({ canceled }) => { + if (canceled) return; + + this.$root.api('notes/delete', { + noteId: this.appearNote.id + }); + + this.$root.post({ initialNote: this.appearNote, renote: this.appearNote.renote, reply: this.appearNote.reply }); + }); + }, + toggleFavorite(favorite: boolean) { this.$root.api(favorite ? 'notes/favorites/create' : 'notes/favorites/delete', { noteId: this.appearNote.id @@ -548,6 +564,11 @@ export default Vue.extend({ ...(this.appearNote.userId == this.$store.state.i.id ? [ null, { + icon: faEdit, + text: this.$t('deleteAndEdit'), + action: this.delEdit + }, + { icon: faTrashAlt, text: this.$t('delete'), action: this.del |