Преглед изворни кода

redirect to presentation if never visited

axolotle пре 3 година
родитељ
комит
32827889a9
1 измењених фајлова са 6 додато и 0 уклоњено
  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.