Browse Source

fix: editor saved state

pull/2097/head
NGPixel 4 years ago
parent
commit
98016d3c42
2 changed files with 12 additions and 4 deletions
  1. 14
      client/components/editor.vue
  2. 2
      client/components/editor/editor-modal-properties.vue

14
client/components/editor.vue

@ -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 => {

2
client/components/editor/editor-modal-properties.vue

@ -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

Loading…
Cancel
Save