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

Version Path
maglevcms-1.4.0 app/frontend/editor/App.vue
maglevcms-1.3.0 app/frontend/editor/App.vue
maglevcms-1.2.2 app/frontend/editor/App.vue
maglevcms-1.2.1 app/frontend/editor/App.vue
maglevcms-1.2.0 app/frontend/editor/App.vue
maglevcms-1.1.7 app/frontend/editor/App.vue
maglevcms-1.1.6 app/frontend/editor/App.vue
maglevcms-1.1.5 app/frontend/editor/App.vue
maglevcms-1.1.4 app/frontend/editor/App.vue
maglevcms-1.1.3 app/frontend/editor/App.vue
maglevcms-1.1.2 app/frontend/editor/App.vue
maglevcms-1.1.1 app/frontend/editor/App.vue
maglevcms-1.1.0 app/frontend/editor/App.vue
maglevcms-1.0.0 app/javascript/editor/App.vue
maglevcms-1.0.0.rc3 app/javascript/editor/App.vue
maglevcms-1.0.0.rc2 app/javascript/editor/App.vue
maglevcms-1.0.0.rc1 app/javascript/editor/App.vue