diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2020-03-21 20:14:41 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2020-03-21 20:14:41 +0900 |
| commit | fc0b86fe192842c5469a016f2c8f2132d0a073f3 (patch) | |
| tree | a14a9da5cbc095818c76dc8c821d08b8be16ed1b /src | |
| parent | Fix #6110 (diff) | |
| parent | Add 削除して編集 (#6147) (diff) | |
| download | sharkey-fc0b86fe192842c5469a016f2c8f2132d0a073f3.tar.gz sharkey-fc0b86fe192842c5469a016f2c8f2132d0a073f3.tar.bz2 sharkey-fc0b86fe192842c5469a016f2c8f2132d0a073f3.zip | |
Merge branch 'develop' of https://github.com/syuilo/misskey into develop
Diffstat (limited to 'src')
| -rw-r--r-- | src/client/components/note.vue | 25 | ||||
| -rw-r--r-- | src/client/components/post-form.vue | 1 |
2 files changed, 24 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 diff --git a/src/client/components/post-form.vue b/src/client/components/post-form.vue index 7b84938d5a..d7bd105d80 100644 --- a/src/client/components/post-form.vue +++ b/src/client/components/post-form.vue @@ -300,6 +300,7 @@ export default Vue.extend({ }); } this.visibility = init.visibility; + this.localOnly = init.localOnly; this.quoteId = init.renote ? init.renote.id : null; } |