Load post status content type from instance config
This commit is contained in:
parent
3e4d465eba
commit
f91e4a5801
@ -169,6 +169,8 @@ const afterStoreSetup = ({ store, i18n }) => {
|
|||||||
store.dispatch('setInstanceOption', { name: 'chatAvailable', value: features.includes('chat') })
|
store.dispatch('setInstanceOption', { name: 'chatAvailable', value: features.includes('chat') })
|
||||||
store.dispatch('setInstanceOption', { name: 'gopherAvailable', value: features.includes('gopher') })
|
store.dispatch('setInstanceOption', { name: 'gopherAvailable', value: features.includes('gopher') })
|
||||||
|
|
||||||
|
store.dispatch('setInstanceOption', { name: 'postFormats', value: metadata.postFormats })
|
||||||
|
|
||||||
store.dispatch('setInstanceOption', { name: 'restrictedNicknames', value: metadata.restrictedNicknames })
|
store.dispatch('setInstanceOption', { name: 'restrictedNicknames', value: metadata.restrictedNicknames })
|
||||||
|
|
||||||
const suggestions = metadata.suggestions
|
const suggestions = metadata.suggestions
|
||||||
|
@ -93,6 +93,9 @@ const settings = {
|
|||||||
currentSaveStateNotice () {
|
currentSaveStateNotice () {
|
||||||
return this.$store.state.interface.settings.currentSaveStateNotice
|
return this.$store.state.interface.settings.currentSaveStateNotice
|
||||||
},
|
},
|
||||||
|
postFormats () {
|
||||||
|
return this.$store.state.instance.postFormats || []
|
||||||
|
},
|
||||||
instanceSpecificPanelPresent () { return this.$store.state.instance.showInstanceSpecificPanel }
|
instanceSpecificPanelPresent () { return this.$store.state.instance.showInstanceSpecificPanel }
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -105,17 +105,9 @@
|
|||||||
{{$t('settings.post_status_content_type')}}
|
{{$t('settings.post_status_content_type')}}
|
||||||
<label for="postContentType" class="select">
|
<label for="postContentType" class="select">
|
||||||
<select id="postContentType" v-model="postContentTypeLocal">
|
<select id="postContentType" v-model="postContentTypeLocal">
|
||||||
<option value="text/plain">
|
<option v-for="postFormat in postFormats" :key="postFormat" :value="postFormat">
|
||||||
{{$t('settings.status_content_type_plain')}}
|
{{$t(`settings.post_formats["${postFormat}"]`)}}
|
||||||
{{postContentTypeDefault == 'text/plain' ? $t('settings.instance_default_simple') : ''}}
|
{{postContentTypeDefault === postFormat ? $t('settings.instance_default_simple') : ''}}
|
||||||
</option>
|
|
||||||
<option value="text/html">
|
|
||||||
HTML
|
|
||||||
{{postContentTypeDefault == 'text/html' ? $t('settings.instance_default_simple') : ''}}
|
|
||||||
</option>
|
|
||||||
<option value="text/markdown">
|
|
||||||
Markdown
|
|
||||||
{{postContentTypeDefault == 'text/markdown' ? $t('settings.instance_default_simple') : ''}}
|
|
||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
<i class="icon-down-open"/>
|
<i class="icon-down-open"/>
|
||||||
|
@ -220,6 +220,11 @@
|
|||||||
"subject_line_email": "Like email: \"re: subject\"",
|
"subject_line_email": "Like email: \"re: subject\"",
|
||||||
"subject_line_mastodon": "Like mastodon: copy as is",
|
"subject_line_mastodon": "Like mastodon: copy as is",
|
||||||
"subject_line_noop": "Do not copy",
|
"subject_line_noop": "Do not copy",
|
||||||
|
"post_formats": {
|
||||||
|
"text/plain": "Plain text",
|
||||||
|
"text/html": "HTML",
|
||||||
|
"text/markdown": "Markdown"
|
||||||
|
},
|
||||||
"post_status_content_type": "Post status content type",
|
"post_status_content_type": "Post status content type",
|
||||||
"status_content_type_plain": "Plain text",
|
"status_content_type_plain": "Plain text",
|
||||||
"stop_gifs": "Play-on-hover GIFs",
|
"stop_gifs": "Play-on-hover GIFs",
|
||||||
|
@ -37,6 +37,7 @@ const defaultState = {
|
|||||||
emoji: [],
|
emoji: [],
|
||||||
customEmoji: [],
|
customEmoji: [],
|
||||||
restrictedNicknames: [],
|
restrictedNicknames: [],
|
||||||
|
postFormats: [],
|
||||||
|
|
||||||
// Feature-set, apparently, not everything here is reported...
|
// Feature-set, apparently, not everything here is reported...
|
||||||
mediaProxyAvailable: false,
|
mediaProxyAvailable: false,
|
||||||
|
Loading…
Reference in New Issue
Block a user