Sha256: 327b80c50fc382a5a9eb27c1d1db7cfe6538857b7ee30702b70f2a128b3e4ea6
Contents?: true
Size: 1.24 KB
Versions: 17
Compression:
Stored size: 1.24 KB
Contents
<template> <div> <router-view /> <modal-root /> </div> </template> <script> import ErrorModalMixin from '@/mixins/error-modal' export default { name: 'App', mixins: [ErrorModalMixin], computed: { uiOpenErrorModal() { return this.$store.state.ui.openErrorModal }, uiErrorModalType() { return this.$store.state.ui.errorModalType }, }, watch: { 'currentPage.path'(newPath, oldPath) { // NOTE: changing the path of the current page must cause a "reload" of the editor if ( newPath !== oldPath && oldPath !== undefined && newPath != this.$router.currentRoute.params.pageId ) this.$router.push({ name: 'editPage', params: { pageId: newPath } }) }, // NOTE: this was an old feature, disabled for now since we've got a warning message for empty pages. // currentSectionList(newList) { // // NOTE: let the editor know that she/he has to add a new section if the page is empty // if (newList.length === 0 && this.$route.name !== 'addSection') // this.$router.push({ name: 'addSection' }) // }, uiOpenErrorModal(newValue, oldValue) { if (newValue && !oldValue) this.openErrorModal(this.uiErrorModalType) }, }, } </script>
Version data entries
17 entries across 17 versions & 1 rubygems