From 38e3c2493de22251000d00d3067fa54090c38817 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 From 20a67e6809b573aa7ec687dabcfe2743c47705c7 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Fri, 31 Aug 2018 00:44:25 +0000 Subject: i18n: make "plain text" translatable --- src/components/post_status_form/post_status_form.vue | 2 +- src/i18n/messages.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src/components/post_status_form') diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue index ac5da442..8b8eeae0 100644 --- a/src/components/post_status_form/post_status_form.vue +++ b/src/components/post_status_form/post_status_form.vue @@ -35,7 +35,7 @@
diff --git a/src/i18n/messages.js b/src/i18n/messages.js index 30055192..bfe0d92b 100644 --- a/src/i18n/messages.js +++ b/src/i18n/messages.js @@ -392,6 +392,9 @@ const en = { unlisted: 'Unlisted - Do not post to public timelines', private: 'Followers-only - Post to followers only', direct: 'Direct - Post to mentioned users only' + }, + content_type: { + plain_text: 'Plain text' } }, finder: { -- cgit v1.2.3-70-g09d2