From 20fc259350b6bc9163899b859b496b86cf0083c5 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Mon, 30 Sep 2019 00:04:43 +0300 Subject: fixed default values for multi-choice configurations, should also fix warnings --- src/components/settings/settings.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/components/settings/settings.js') diff --git a/src/components/settings/settings.js b/src/components/settings/settings.js index 3923fc60..a327ab28 100644 --- a/src/components/settings/settings.js +++ b/src/components/settings/settings.js @@ -10,6 +10,11 @@ import { instanceDefaultProperties, defaultState as configDefaultState } from '. const pleromaFeCommitUrl = 'https://git.pleroma.social/pleroma/pleroma-fe/commit/' const pleromaBeCommitUrl = 'https://git.pleroma.social/pleroma/pleroma/commit/' +const multiChoiceProperties = [ + 'postContentType', + 'subjectLineBehavior' +] + const settings = { data () { const instance = this.$store.state.instance @@ -51,6 +56,16 @@ const settings = { }, // Getting localized values for instance-default properties ...instanceDefaultProperties + .filter(key => multiChoiceProperties.includes(key)) + .map(key => [ + key + 'DefaultValue', + function () { + return this.$store.getters.instanceDefaultConfig[key] + } + ]) + .reduce((acc, [key, value]) => ({ ...acc, [key]: value }), {}), + ...instanceDefaultProperties + .filter(key => !multiChoiceProperties.includes(key)) .map(key => [ key + 'LocalizedValue', function () { -- cgit v1.2.3-70-g09d2