From b1785f419a6a81427fc1ac477995bbfee0249d80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Sun, 11 Apr 2021 11:34:39 +0200 Subject: [PATCH] Add homepage with some stats --- web/frontend/src/App.vue | 2 + web/frontend/src/components/Home.vue | 99 ++++++++++++++++++++++++++++ web/frontend/src/main.ts | 3 +- web/frontend/src/router/router.ts | 27 -------- 4 files changed, 103 insertions(+), 28 deletions(-) create mode 100644 web/frontend/src/components/Home.vue delete mode 100644 web/frontend/src/router/router.ts diff --git a/web/frontend/src/App.vue b/web/frontend/src/App.vue index a60bdc0..f52b73e 100644 --- a/web/frontend/src/App.vue +++ b/web/frontend/src/App.vue @@ -32,11 +32,13 @@ import { Component, Vue } from 'vue-property-decorator'; import AttemptList from '@/components/AttemptList.vue'; import Stats from '@/components/Stats.vue'; +import Home from '@/components/Home.vue'; @Component({ components: { AttemptList, Stats, + Home, }, }) export default class App extends Vue {} diff --git a/web/frontend/src/components/Home.vue b/web/frontend/src/components/Home.vue new file mode 100644 index 0000000..0ff4873 --- /dev/null +++ b/web/frontend/src/components/Home.vue @@ -0,0 +1,99 @@ + + + + \ No newline at end of file diff --git a/web/frontend/src/main.ts b/web/frontend/src/main.ts index 8ff3bd3..f2b87a2 100644 --- a/web/frontend/src/main.ts +++ b/web/frontend/src/main.ts @@ -2,6 +2,7 @@ import Vue from 'vue'; import { BootstrapVue, IconsPlugin } from 'bootstrap-vue'; import VueRouter, { RouteConfig } from 'vue-router'; import AttemptList from '@/components/AttemptList.vue'; +import Home from '@/components/Home.vue'; import Stats from '@/components/Stats.vue'; import 'bootstrap/dist/css/bootstrap.css'; import 'bootstrap-vue/dist/bootstrap-vue.css'; @@ -21,7 +22,7 @@ const routes: Array = [ { path: '/', name: 'Home', - component: Stats, + component: Home, alias: '/home', }, { diff --git a/web/frontend/src/router/router.ts b/web/frontend/src/router/router.ts deleted file mode 100644 index 1872ccf..0000000 --- a/web/frontend/src/router/router.ts +++ /dev/null @@ -1,27 +0,0 @@ -import Vue from 'vue'; -import VueRouter, { RouteConfig } from 'vue-router'; -import AttemptList from "../components/Simulator.vue"; -import HelloWorld from "../components/HelloWorld.vue"; - -Vue.use(VueRouter); - -const routes: Array = [ - { - path: '/', - name: 'Home', - component: HelloWorld - }, - { - path: '/attempts', - name: 'Attempt List', - component: AttemptList - } -]; - -const router = new VueRouter({ - mode: 'history', - base: process.env.BASE_URL, - routes -}); - -export default router; \ No newline at end of file