diff --git a/app/package.json b/app/package.json
index d38cd0b..8f5147c 100644
--- a/app/package.json
+++ b/app/package.json
@@ -19,6 +19,7 @@
"axios": "^1.4.0",
"socket.io-client": "^4.7.1",
"vue": "^3.3.4",
+ "vue-router": "^4.2.4",
"xterm": "^5.2.1",
"xterm-addon-attach": "^0.8.0",
"xterm-addon-fit": "^0.7.0"
diff --git a/app/src/App.vue b/app/src/App.vue
index a4d6e42..767991b 100644
--- a/app/src/App.vue
+++ b/app/src/App.vue
@@ -1,68 +1,15 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
+
+
diff --git a/app/src/components/AuthenticationPart.vue b/app/src/components/AuthenticationPart.vue
index 26707d9..3d2da99 100644
--- a/app/src/components/AuthenticationPart.vue
+++ b/app/src/components/AuthenticationPart.vue
@@ -4,7 +4,7 @@
-
Linux Odysssey
+
Linux Odyssey
diff --git a/app/src/components/VisualizationPart.vue b/app/src/components/VisualizationPart.vue
index f1c9a77..ac9a061 100644
--- a/app/src/components/VisualizationPart.vue
+++ b/app/src/components/VisualizationPart.vue
@@ -42,7 +42,7 @@ onMounted(() => {
})
onUnmounted(() => {
- treeRef.value.removeEventListener('mousedown', mouseDownHandler)
+ treeRef?.value?.removeEventListener('mousedown', mouseDownHandler)
})
diff --git a/app/src/main.js b/app/src/main.js
index 84f3945..55e4c22 100644
--- a/app/src/main.js
+++ b/app/src/main.js
@@ -1,4 +1,5 @@
import { createApp } from 'vue'
+import { createRouter, createWebHistory } from 'vue-router'
import './style.css'
/* import the fontawesome core */
@@ -24,7 +25,10 @@ import {
faCircleQuestion,
faCircleRight,
} from '@fortawesome/free-regular-svg-icons'
+
import App from './App.vue'
+import GamePage from './views/GamePage.vue'
+import AuthPage from './views/AuthPage.vue'
/* add icons to the library */
library.add(
@@ -41,4 +45,20 @@ library.add(
faTerminal
)
-createApp(App).component('font-awesome-icon', FontAwesomeIcon).mount('#app')
+const routes = [
+ { path: '/', name: 'Home', component: AuthPage },
+ { path: '/game', name: 'Game', component: GamePage },
+]
+
+const router = createRouter({
+ history: createWebHistory(),
+ routes,
+})
+
+const app = createApp(App)
+
+app.component('font-awesome-icon', FontAwesomeIcon)
+
+app.use(router)
+
+app.mount('#app')
diff --git a/app/src/AuthenticationPage.vue b/app/src/views/AuthPage.vue
similarity index 72%
rename from app/src/AuthenticationPage.vue
rename to app/src/views/AuthPage.vue
index b7c2280..749522b 100644
--- a/app/src/AuthenticationPage.vue
+++ b/app/src/views/AuthPage.vue
@@ -1,6 +1,6 @@
diff --git a/app/src/views/GamePage.vue b/app/src/views/GamePage.vue
new file mode 100644
index 0000000..4aff284
--- /dev/null
+++ b/app/src/views/GamePage.vue
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yarn.lock b/yarn.lock
index 874a6cd..fc0cbb7 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -975,6 +975,11 @@
"@vue/compiler-dom" "3.3.4"
"@vue/shared" "3.3.4"
+"@vue/devtools-api@^6.5.0":
+ version "6.5.0"
+ resolved "https://registry.yarnpkg.com/@vue/devtools-api/-/devtools-api-6.5.0.tgz#98b99425edee70b4c992692628fa1ea2c1e57d07"
+ integrity sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q==
+
"@vue/eslint-config-prettier@^7.1.0":
version "7.1.0"
resolved "https://registry.yarnpkg.com/@vue/eslint-config-prettier/-/eslint-config-prettier-7.1.0.tgz#97936379c7fb1d982b9d2c6b122306e3c2e464c8"
@@ -4820,6 +4825,13 @@ vue-eslint-parser@^9.3.0:
lodash "^4.17.21"
semver "^7.3.6"
+vue-router@^4.2.4:
+ version "4.2.4"
+ resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-4.2.4.tgz#382467a7e2923e6a85f015d081e1508052c191b9"
+ integrity sha512-9PISkmaCO02OzPVOMq2w82ilty6+xJmQrarYZDkjZBfl4RvYAlt4PKnEX21oW4KTtWfa9OuO/b3qk1Od3AEdCQ==
+ dependencies:
+ "@vue/devtools-api" "^6.5.0"
+
vue@^3.3.4:
version "3.3.4"
resolved "https://registry.yarnpkg.com/vue/-/vue-3.3.4.tgz#8ed945d3873667df1d0fcf3b2463ada028f88bd6"