From 88f2859f47098c2f4d8908229b7356890728f033 Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Fri, 15 May 2020 01:24:12 +0300 Subject: [PATCH] Disable tabs that don't have settings that can be changed --- src/views/settings/index.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/views/settings/index.vue b/src/views/settings/index.vue index ff1b3435..a9fe87e5 100644 --- a/src/views/settings/index.vue +++ b/src/views/settings/index.vue @@ -33,7 +33,7 @@ @@ -227,6 +227,11 @@ export default { : { value: `${searchObj.label} in ${searchObj.groupLabel}`, group: searchObj.groupKey, key: searchObj.key } }) cb(results) + }, + settingsCantBeChanged(settings) { + const existingSettings = settings.filter(setting => + this.$store.state.settings.description.findIndex(el => el.key === setting) !== -1) + return existingSettings.length === 0 } } }