Merge branch 'issue-383-content-type' into 'develop'

#383: content type error

Closes #383

See merge request pleroma/pleroma-fe!603
This commit is contained in:
Shpuld Shpludson 2019-02-21 17:06:10 +00:00
commit 254b0afab7
2 changed files with 7 additions and 7 deletions

View file

@ -56,6 +56,10 @@ const PostStatusForm = {
? this.copyMessageScope ? this.copyMessageScope
: this.$store.state.users.currentUser.default_scope : this.$store.state.users.currentUser.default_scope
const contentType = typeof this.$store.state.config.postContentType === 'undefined'
? this.$store.state.instance.postContentType
: this.$store.state.config.postContentType
return { return {
dropFiles: [], dropFiles: [],
submitDisabled: false, submitDisabled: false,
@ -67,7 +71,8 @@ const PostStatusForm = {
status: statusText, status: statusText,
nsfw: false, nsfw: false,
files: [], files: [],
visibility: scope visibility: scope,
contentType
}, },
caret: 0 caret: 0
} }
@ -166,11 +171,6 @@ const PostStatusForm = {
}, },
formattingOptionsEnabled () { formattingOptionsEnabled () {
return this.$store.state.instance.formattingOptionsEnabled return this.$store.state.instance.formattingOptionsEnabled
},
defaultPostContentType () {
return typeof this.$store.state.config.postContentType === 'undefined'
? this.$store.state.instance.postContentType
: this.$store.state.config.postContentType
} }
}, },
methods: { methods: {

View file

@ -35,7 +35,7 @@
<div class="visibility-tray"> <div class="visibility-tray">
<span class="text-format" v-if="formattingOptionsEnabled"> <span class="text-format" v-if="formattingOptionsEnabled">
<label for="post-content-type" class="select"> <label for="post-content-type" class="select">
<select id="post-content-type" v-model="defaultPostContentType" class="form-control"> <select id="post-content-type" v-model="newStatus.contentType" class="form-control">
<option value="text/plain">{{$t('post_status.content_type.plain_text')}}</option> <option value="text/plain">{{$t('post_status.content_type.plain_text')}}</option>
<option value="text/html">HTML</option> <option value="text/html">HTML</option>
<option value="text/markdown">Markdown</option> <option value="text/markdown">Markdown</option>