diff options
| -rw-r--r-- | src/components/post_status_form/post_status_form.js | 4 | ||||
| -rw-r--r-- | src/components/status/status.js | 6 | ||||
| -rw-r--r-- | src/components/status/status.vue | 2 |
3 files changed, 10 insertions, 2 deletions
diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index cbff7827..7d40bc3c 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -24,7 +24,8 @@ const PostStatusForm = { 'replyTo', 'repliedUser', 'attentions', - 'messageScope' + 'messageScope', + 'subject' ], components: { MediaUpload @@ -52,6 +53,7 @@ const PostStatusForm = { posting: false, highlighted: 0, newStatus: { + spoilerText: this.subject, status: statusText, nsfw: false, files: [], diff --git a/src/components/status/status.js b/src/components/status/status.js index 7aa1e03b..a6c49f7c 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -173,6 +173,12 @@ const Status = { } return true }, + replySubject () { + if (this.status.summary && !this.status.summary.match(/^re[: ]/i)) { + return 're: '.concat(this.status.summary) + } + return this.status.summary + }, attachmentSize () { if ((this.$store.state.config.hideAttachments && !this.inConversation) || (this.$store.state.config.hideAttachmentsInConv && this.inConversation)) { diff --git a/src/components/status/status.vue b/src/components/status/status.vue index c7ef92a2..123b0cc2 100644 --- a/src/components/status/status.vue +++ b/src/components/status/status.vue @@ -102,7 +102,7 @@ </div> <div class="container" v-if="replying"> <div class="reply-left"/> - <post-status-form class="reply-body" :reply-to="status.id" :attentions="status.attentions" :repliedUser="status.user" :message-scope="status.visibility" v-on:posted="toggleReplying"/> + <post-status-form class="reply-body" :reply-to="status.id" :attentions="status.attentions" :repliedUser="status.user" :message-scope="status.visibility" :subject="replySubject" v-on:posted="toggleReplying"/> </div> </template> </div> |
