diff options
| author | Henry Jameson <me@hjkos.com> | 2019-09-30 00:04:43 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2019-09-30 00:04:43 +0300 |
| commit | 20fc259350b6bc9163899b859b496b86cf0083c5 (patch) | |
| tree | e06b78215ca3ecda32a6e4a6c5e628d14696fd82 /src/components/settings/settings.js | |
| parent | 39b71e5dd6afef7c15b236c5c3d90984d2836d2e (diff) | |
fixed default values for multi-choice configurations, should also fix warnings
Diffstat (limited to 'src/components/settings/settings.js')
| -rw-r--r-- | src/components/settings/settings.js | 15 |
1 files changed, 15 insertions, 0 deletions
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 () { |
