fix: editor saved state

This commit is contained in:
NGPixel 2020-06-21 01:04:36 -04:00
parent 09114524ff
commit 98016d3c42
2 changed files with 12 additions and 4 deletions

View File

@ -168,7 +168,9 @@ export default {
publishEndDate: '', publishEndDate: '',
publishStartDate: '', publishStartDate: '',
tags: '', tags: '',
title: '' title: '',
css: '',
js: ''
} }
} }
}, },
@ -188,7 +190,11 @@ export default {
this.savedState.title !== this.$store.get('page/title'), this.savedState.title !== this.$store.get('page/title'),
this.savedState.description !== this.$store.get('page/description'), this.savedState.description !== this.$store.get('page/description'),
this.savedState.tags !== this.$store.get('page/tags'), this.savedState.tags !== this.$store.get('page/tags'),
this.savedState.isPublished !== this.$store.get('page/isPublished') this.savedState.isPublished !== this.$store.get('page/isPublished'),
this.savedState.publishStartDate !== this.$store.get('page/publishStartDate'),
this.savedState.publishEndDate !== this.$store.get('page/publishEndDate'),
this.savedState.css !== this.$store.get('page/scriptCss'),
this.savedState.js !== this.$store.get('page/scriptJs')
], Boolean) ], Boolean)
} }
}, },
@ -526,7 +532,9 @@ export default {
publishEndDate: this.$store.get('page/publishEndDate') || '', publishEndDate: this.$store.get('page/publishEndDate') || '',
publishStartDate: this.$store.get('page/publishStartDate') || '', publishStartDate: this.$store.get('page/publishStartDate') || '',
tags: this.$store.get('page/tags'), tags: this.$store.get('page/tags'),
title: this.$store.get('page/title') title: this.$store.get('page/title'),
css: this.$store.get('page/scriptCss'),
js: this.$store.get('page/scriptJs')
} }
}, },
injectCustomCss: _.debounce(css => { injectCustomCss: _.debounce(css => {

View File

@ -21,7 +21,7 @@
v-tab {{$t('editor:props.info')}} v-tab {{$t('editor:props.info')}}
v-tab {{$t('editor:props.scheduling')}} v-tab {{$t('editor:props.scheduling')}}
v-tab(:disabled='!hasScriptPermission') {{$t('editor:props.scripts')}} v-tab(:disabled='!hasScriptPermission') {{$t('editor:props.scripts')}}
v-tab {{$t('editor:props.social')}} v-tab(disabled) {{$t('editor:props.social')}}
v-tab(:disabled='!hasStylePermission') {{$t('editor:props.styles')}} v-tab(:disabled='!hasStylePermission') {{$t('editor:props.styles')}}
v-tab-item(transition='fade-transition', reverse-transition='fade-transition') v-tab-item(transition='fade-transition', reverse-transition='fade-transition')
v-card-text.pt-5 v-card-text.pt-5