Check if settings without keys exists in description.exs
This commit is contained in:
parent
88f2859f47
commit
342222d45c
2 changed files with 12 additions and 3 deletions
|
@ -65,7 +65,7 @@ export const tabs = {
|
|||
},
|
||||
'relays': {
|
||||
label: 'settings.relays',
|
||||
settings: []
|
||||
settings: ['relays']
|
||||
},
|
||||
'web-push': {
|
||||
label: 'settings.webPush',
|
||||
|
|
|
@ -229,8 +229,17 @@ export default {
|
|||
cb(results)
|
||||
},
|
||||
settingsCantBeChanged(settings) {
|
||||
const existingSettings = settings.filter(setting =>
|
||||
this.$store.state.settings.description.findIndex(el => el.key === setting) !== -1)
|
||||
const existingSettings = settings.filter(setting => {
|
||||
if ([':esshd', ':cors_plug', ':http_signatures', ':quack', ':logger', ':swoosh', ':mime'].includes(setting)) {
|
||||
return this.$store.state.settings.description.findIndex(el => el.group === setting) !== -1
|
||||
} else if (setting === 'Pleroma.Web.Auth.Authenticator' || setting === ':admin_token') {
|
||||
return this.$store.state.settings.description.findIndex(el => el.children[0].key === setting) !== -1
|
||||
} else if (setting === 'relays') {
|
||||
return [setting]
|
||||
} else {
|
||||
return this.$store.state.settings.description.findIndex(el => el.key === setting) !== -1
|
||||
}
|
||||
})
|
||||
return existingSettings.length === 0
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue