forked from AkkomaGang/admin-fe
Fix editor inputs
This commit is contained in:
parent
efa4b975d3
commit
536e77cdaa
2 changed files with 9 additions and 3 deletions
|
@ -181,7 +181,10 @@ export default {
|
||||||
async onSubmit() {
|
async onSubmit() {
|
||||||
try {
|
try {
|
||||||
await this.$store.dispatch('SubmitChanges')
|
await this.$store.dispatch('SubmitChanges')
|
||||||
await this.$store.dispatch('UpdateInstanceDocs', { name: 'instance-panel', content: this.editorContent })
|
await this.$store.dispatch('UpdateInstanceDocs', {
|
||||||
|
name: 'instance-panel',
|
||||||
|
content: this.editorContent.length > 0 ? this.editorContent : this.instancePanelContent
|
||||||
|
})
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -114,12 +114,15 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleEditorUpdate(content) {
|
handleEditorUpdate(content) {
|
||||||
this.editorContent = content
|
this.termsOfServices = content
|
||||||
},
|
},
|
||||||
async onSubmit() {
|
async onSubmit() {
|
||||||
try {
|
try {
|
||||||
await this.$store.dispatch('SubmitChanges')
|
await this.$store.dispatch('SubmitChanges')
|
||||||
await this.$store.dispatch('UpdateInstanceDocs', { name: 'terms-of-service', content: this.editorContent })
|
await this.$store.dispatch('UpdateInstanceDocs', {
|
||||||
|
name: 'terms-of-service',
|
||||||
|
content: this.termsOfServices.length > 0 ? this.termsOfServices : this.termsOfServicesContent
|
||||||
|
})
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue