Merge branch 'fix/post-content-type' into 'develop'

#327: Load post status content type from instance config

Closes #327

See merge request pleroma/pleroma-fe!641
This commit is contained in:
Shpuld Shpludson 2019-03-07 16:03:06 +00:00
commit bf1fa52e5e
12 changed files with 18 additions and 21 deletions

View file

@ -171,6 +171,9 @@ const PostStatusForm = {
},
formattingOptionsEnabled () {
return this.$store.state.instance.formattingOptionsEnabled
},
postFormats () {
return this.$store.state.instance.postFormats || []
}
},
methods: {

View file

@ -38,9 +38,9 @@
<span class="text-format" v-if="formattingOptionsEnabled">
<label for="post-content-type" class="select">
<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/html">HTML</option>
<option value="text/markdown">Markdown</option>
<option v-for="postFormat in postFormats" :key="postFormat" :value="postFormat">
{{$t(`post_status.content_type["${postFormat}"]`)}}
</option>
</select>
<i class="icon-down-open"></i>
</label>