aboutsummaryrefslogtreecommitdiff
path: root/src/components/settings_modal/helpers/choice_setting.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/settings_modal/helpers/choice_setting.js')
-rw-r--r--src/components/settings_modal/helpers/choice_setting.js27
1 files changed, 26 insertions, 1 deletions
diff --git a/src/components/settings_modal/helpers/choice_setting.js b/src/components/settings_modal/helpers/choice_setting.js
index a3c3bf44..3ff81bc9 100644
--- a/src/components/settings_modal/helpers/choice_setting.js
+++ b/src/components/settings_modal/helpers/choice_setting.js
@@ -11,7 +11,32 @@ export default {
...Setting.props,
options: {
type: Array,
- required: true
+ required: false
+ },
+ optionLabelMap: {
+ type: Object,
+ required: false,
+ default: {}
+ }
+ },
+ computed: {
+ ...Setting.computed,
+ realOptions () {
+ if (this.source === 'admin') {
+ console.log(this.backendDescriptionSuggestions)
+ return this.backendDescriptionSuggestions.map(x => ({
+ key: x,
+ value: x,
+ label: this.optionLabelMap[x] || x
+ }))
+ }
+ return this.options
+ }
+ },
+ methods: {
+ ...Setting.methods,
+ getValue (e) {
+ return e
}
}
}