better frontends tab, now you can set default frontend

This commit is contained in:
Henry Jameson 2023-03-29 23:26:57 +03:00
commit ac75d051b7
11 changed files with 179 additions and 64 deletions

View file

@ -7,7 +7,6 @@ export default {
computed: {
...Setting.computed,
isDirty () {
console.log(this.state, this.draft)
return !isEqual(this.state, this.draft)
}
}

View file

@ -61,7 +61,7 @@ export default {
// TODO allow passing shared draft object?
get () {
if (this.realSource === 'admin') {
return get(this.$store.state.adminSettings.draft, this.path)
return get(this.$store.state.adminSettings.draft, this.canonPath)
} else {
return this.localDraft
}
@ -75,7 +75,7 @@ export default {
}
},
state () {
const value = get(this.configSource, this.path)
const value = get(this.configSource, this.canonPath)
if (value === undefined) {
return this.defaultState
} else {

View file

@ -10,6 +10,9 @@ const SharedComputedObject = () => ({
},
adminConfig () {
return this.$store.state.adminSettings.config
},
adminDraft () {
return this.$store.state.adminSettings.draft
}
})