From 76df311899b18ca93314e886a37f62fb855a8114 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Fri, 31 Aug 2018 04:31:59 +0300 Subject: [PATCH] Revert "add the ability to select a post's content type" This reverts commit 38e3c2493de22251000d00d3067fa54090c38817. --- src/App.scss | 4 ---- .../post_status_form/post_status_form.js | 7 ++----- .../post_status_form/post_status_form.vue | 20 +++++-------------- src/services/api/api.service.js | 3 +-- .../status_poster/status_poster.service.js | 4 ++-- 5 files changed, 10 insertions(+), 28 deletions(-) diff --git a/src/App.scss b/src/App.scss index 70769fad5..09014c15b 100644 --- a/src/App.scss +++ b/src/App.scss @@ -498,10 +498,6 @@ nav { color: $fallback--lightFg; color: var(--lightFg, $fallback--lightFg); } - - .text-format { - float: right; - } } .visibility-notice { diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index 7d2735c5f..06a428fff 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -55,7 +55,6 @@ const PostStatusForm = { newStatus: { spoilerText: this.subject, status: statusText, - contentType: 'text/plain', nsfw: false, files: [], visibility: this.messageScope || this.$store.state.users.currentUser.default_scope @@ -211,15 +210,13 @@ const PostStatusForm = { sensitive: newStatus.nsfw, media: newStatus.files, store: this.$store, - inReplyToStatusId: this.replyTo, - contentType: newStatus.contentType + inReplyToStatusId: this.replyTo }).then((data) => { if (!data.error) { this.newStatus = { status: '', files: [], - visibility: newStatus.visibility, - contentType: newStatus.contentType + visibility: newStatus.visibility } 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 210340f9c..d1bd3014d 100644 --- a/src/components/post_status_form/post_status_form.vue +++ b/src/components/post_status_form/post_status_form.vue @@ -32,21 +32,11 @@ @input="resize" @paste="paste"> -
- - - - -
- - - - -
+
+ + + +
diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js index 87315657a..efea86cf5 100644 --- a/src/services/api/api.service.js +++ b/src/services/api/api.service.js @@ -373,7 +373,7 @@ const unretweet = ({ id, credentials }) => { }) } -const postStatus = ({credentials, status, spoilerText, visibility, sensitive, mediaIds, inReplyToStatusId, contentType}) => { +const postStatus = ({credentials, status, spoilerText, visibility, sensitive, mediaIds, inReplyToStatusId}) => { const idsText = mediaIds.join(',') const form = new FormData() @@ -382,7 +382,6 @@ const postStatus = ({credentials, status, spoilerText, visibility, sensitive, me if (spoilerText) form.append('spoiler_text', spoilerText) if (visibility) form.append('visibility', visibility) if (sensitive) form.append('sensitive', sensitive) - if (contentType) form.append('content_type', contentType) form.append('media_ids', idsText) if (inReplyToStatusId) { form.append('in_reply_to_status_id', inReplyToStatusId) diff --git a/src/services/status_poster/status_poster.service.js b/src/services/status_poster/status_poster.service.js index 7f8b0fc07..c3bbbaa33 100644 --- a/src/services/status_poster/status_poster.service.js +++ b/src/services/status_poster/status_poster.service.js @@ -1,10 +1,10 @@ import { map } from 'lodash' import apiService from '../api/api.service.js' -const postStatus = ({ store, status, spoilerText, visibility, sensitive, media = [], inReplyToStatusId = undefined, contentType = 'text/plain' }) => { +const postStatus = ({ store, status, spoilerText, visibility, sensitive, media = [], inReplyToStatusId = undefined }) => { const mediaIds = map(media, 'id') - return apiService.postStatus({credentials: store.state.users.currentUser.credentials, status, spoilerText, visibility, sensitive, mediaIds, inReplyToStatusId, contentType}) + return apiService.postStatus({credentials: store.state.users.currentUser.credentials, status, spoilerText, visibility, sensitive, mediaIds, inReplyToStatusId}) .then((data) => data.json()) .then((data) => { if (!data.error) {