From 9a43ba73e647c69b9666441feff139836d525f75 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Fri, 31 Aug 2018 00:42:42 +0000 Subject: add the ability to select a post's content type --- src/components/post_status_form/post_status_form.js | 7 +++++-- src/components/post_status_form/post_status_form.vue | 20 +++++++++++++++----- 2 files changed, 20 insertions(+), 7 deletions(-) (limited to 'src/components/post_status_form') diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index 06a428ff..7d2735c5 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -55,6 +55,7 @@ const PostStatusForm = { newStatus: { spoilerText: this.subject, status: statusText, + contentType: 'text/plain', nsfw: false, files: [], visibility: this.messageScope || this.$store.state.users.currentUser.default_scope @@ -210,13 +211,15 @@ const PostStatusForm = { sensitive: newStatus.nsfw, media: newStatus.files, store: this.$store, - inReplyToStatusId: this.replyTo + inReplyToStatusId: this.replyTo, + contentType: newStatus.contentType }).then((data) => { if (!data.error) { this.newStatus = { status: '', files: [], - visibility: newStatus.visibility + visibility: newStatus.visibility, + contentType: newStatus.contentType } this.$emit('posted') let el = this.$el.querySelector('textarea') diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue index 9f8b2661..ac5da442 100644 --- a/src/components/post_status_form/post_status_form.vue +++ b/src/components/post_status_form/post_status_form.vue @@ -32,11 +32,21 @@ @input="resize" @paste="paste"> -
- - - - +
+ + + + +
+ + + + +
-- cgit v1.2.3-70-g09d2