Sfoglia il codice sorgente

redirect to presentation if never visited

axolotle 3 anni fa
parent
commit
32827889a9
1 ha cambiato i file con 6 aggiunte e 0 eliminazioni
  1. 6 0
      src/App.vue

+ 6 - 0
src/App.vue

@@ -23,6 +23,12 @@ export default {
     NodesHistory
   },
 
+  created () {
+    if (!this.$store.state.pages.visited) {
+      this.$router.push({ name: 'introduction' })
+    }
+  },
+
   metaInfo () {
     return {
       // if no subcomponents specify a metaInfo.title, try to get one from the route name.