diff --git a/package-lock.json b/package-lock.json
index 2116d4b5..1bef21c3 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -6,7 +6,8 @@
"": {
"dependencies": {
"axios": "^0.26.0",
- "vue-color": "^2.7.0"
+ "vue-color": "^2.7.0",
+ "vue-router": "3"
},
"devDependencies": {
"@vitejs/plugin-vue2": "^2.2.0",
@@ -2458,6 +2459,11 @@
}
}
},
+ "node_modules/vue-router": {
+ "version": "3.6.5",
+ "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.6.5.tgz",
+ "integrity": "sha512-VYXZQLtjuvKxxcshuRAwjHnciqZVoXAjTjcqBTz4rKc8qih9g9pI3hbDjmqXaHdgL3v8pV6P8Z335XvHzESxLQ=="
+ },
"node_modules/watchpack": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz",
diff --git a/package.json b/package.json
index 5bfe63e2..5b313438 100644
--- a/package.json
+++ b/package.json
@@ -20,6 +20,7 @@
},
"dependencies": {
"axios": "^0.26.0",
- "vue-color": "^2.7.0"
+ "vue-color": "^2.7.0",
+ "vue-router": "3"
}
}
diff --git a/resources/assets/js/prototype/app.js b/resources/assets/js/prototype/app.js
index 86872e70..68babdc9 100644
--- a/resources/assets/js/prototype/app.js
+++ b/resources/assets/js/prototype/app.js
@@ -1,8 +1,32 @@
import Vue from 'vue';
+import VueRouter from 'vue-router';
import App from './components/App.vue';
-const app = new Vue({
+import Login from './screens/Login.vue';
+import Register from './screens/Register.vue';
+
+Vue.use(VueRouter);
+
+const routes = [
+ {
+ path: '/prototype/login',
+ name: 'login',
+ component: Login,
+ }, {
+ path: '/prototype/register',
+ name: 'register',
+ component: Register,
+ },
+];
+
+const router = new VueRouter({
+ mode: 'history',
+ routes,
+});
+
+new Vue({
el: '#app',
- render: h => h(App)
-})
+ router,
+ render: h => h(App),
+});
diff --git a/resources/assets/js/prototype/components/App.vue b/resources/assets/js/prototype/components/App.vue
index 0e4c33c9..9beff603 100644
--- a/resources/assets/js/prototype/components/App.vue
+++ b/resources/assets/js/prototype/components/App.vue
@@ -1,9 +1,7 @@
-