Update rendering and data flow for Editor on Other tab

This commit is contained in:
Angelina Filippova 2020-09-20 01:01:03 +03:00
parent cad7ad8360
commit d0f73f4222

View file

@ -1,6 +1,6 @@
<template> <template>
<div v-if="!loading" :class="isSidebarOpen" class="form-container"> <div v-if="!loading" :class="isSidebarOpen" class="form-container">
<editor-input :content="termsOfServicesContent" :name="'terms-of-service'" @input="handleEditorUpdate"/> <editor-input v-model="termsOfServicesContent" :name="'terms-of-service'" @input="handleEditorUpdate"/>
<el-form :model="mimeTypesData" :label-position="labelPosition" :label-width="labelWidth"> <el-form :model="mimeTypesData" :label-position="labelPosition" :label-width="labelWidth">
<setting :setting-group="mimeTypes" :data="mimeTypesData"/> <setting :setting-group="mimeTypes" :data="mimeTypesData"/>
</el-form> </el-form>
@ -34,7 +34,7 @@ export default {
components: { EditorInput, Setting }, components: { EditorInput, Setting },
data() { data() {
return { return {
editorContent: '' termsOfServices: ''
} }
}, },
computed: { computed: {
@ -89,8 +89,13 @@ export default {
remoteIpData() { remoteIpData() {
return _.get(this.settings.settings, [':pleroma', 'Pleroma.Web.Plugs.RemoteIp']) || {} return _.get(this.settings.settings, [':pleroma', 'Pleroma.Web.Plugs.RemoteIp']) || {}
}, },
termsOfServicesContent() { termsOfServicesContent: {
get() {
return this.$store.state.settings.termsOfServices return this.$store.state.settings.termsOfServices
},
set(content) {
this.termsOfServices = content
}
} }
}, },
async mounted() { async mounted() {