aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/boot/after_store.js2
-rw-r--r--src/components/settings/settings.js3
-rw-r--r--src/components/settings/settings.vue14
-rw-r--r--src/i18n/en.json5
-rw-r--r--src/modules/instance.js1
5 files changed, 14 insertions, 11 deletions
diff --git a/src/boot/after_store.js b/src/boot/after_store.js
index 53ecc083..a8e2bf35 100644
--- a/src/boot/after_store.js
+++ b/src/boot/after_store.js
@@ -169,6 +169,8 @@ const afterStoreSetup = ({ store, i18n }) => {
store.dispatch('setInstanceOption', { name: 'chatAvailable', value: features.includes('chat') })
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 })
const suggestions = metadata.suggestions
diff --git a/src/components/settings/settings.js b/src/components/settings/settings.js
index 6e2dff7b..979457a5 100644
--- a/src/components/settings/settings.js
+++ b/src/components/settings/settings.js
@@ -93,6 +93,9 @@ const settings = {
currentSaveStateNotice () {
return this.$store.state.interface.settings.currentSaveStateNotice
},
+ postFormats () {
+ return this.$store.state.instance.postFormats || []
+ },
instanceSpecificPanelPresent () { return this.$store.state.instance.showInstanceSpecificPanel }
},
watch: {
diff --git a/src/components/settings/settings.vue b/src/components/settings/settings.vue
index 5041b3a3..c0cfe1ab 100644
--- a/src/components/settings/settings.vue
+++ b/src/components/settings/settings.vue
@@ -105,17 +105,9 @@
{{$t('settings.post_status_content_type')}}
<label for="postContentType" class="select">
<select id="postContentType" v-model="postContentTypeLocal">
- <option value="text/plain">
- {{$t('settings.status_content_type_plain')}}
- {{postContentTypeDefault == 'text/plain' ? $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 v-for="postFormat in postFormats" :key="postFormat" :value="postFormat">
+ {{$t(`settings.post_formats["${postFormat}"]`)}}
+ {{postContentTypeDefault === postFormat ? $t('settings.instance_default_simple') : ''}}
</option>
</select>
<i class="icon-down-open"/>
diff --git a/src/i18n/en.json b/src/i18n/en.json
index c5a4a90d..e614fb6c 100644
--- a/src/i18n/en.json
+++ b/src/i18n/en.json
@@ -220,6 +220,11 @@
"subject_line_email": "Like email: \"re: subject\"",
"subject_line_mastodon": "Like mastodon: copy as is",
"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",
"status_content_type_plain": "Plain text",
"stop_gifs": "Play-on-hover GIFs",
diff --git a/src/modules/instance.js b/src/modules/instance.js
index c31d02b9..24c52f9c 100644
--- a/src/modules/instance.js
+++ b/src/modules/instance.js
@@ -37,6 +37,7 @@ const defaultState = {
emoji: [],
customEmoji: [],
restrictedNicknames: [],
+ postFormats: [],
// Feature-set, apparently, not everything here is reported...
mediaProxyAvailable: false,