advent-of-code

Entries to advent of code, multiple years
git clone git://git.finwo.net/misc/advent-of-code
Log | Files | Refs

main.js (1155B)


      1 import root from './root.vue';
      2 import { createApp } from 'vue';
      3 import { createRouter, createWebHashHistory } from 'vue-router';
      4 
      5 import VueNotificationList from '@dafcoe/vue-notification'
      6 import '@dafcoe/vue-notification/dist/vue-notification.css'
      7 
      8 import PageHome     from './page/home.vue';
      9 import PageGameList from './page/game-list.vue';
     10 import PageGame     from './page/game.vue';
     11 import PageNotFound from './page/not-found.vue';
     12 
     13 const router = createRouter({
     14   history: createWebHashHistory(),
     15   routes: [
     16     { path: '/'              , component: PageHome    , name: 'Home'     , meta: { nav: true , icon: 'home'            } },
     17     { path: '/game/:uuid(.*)', component: PageGame    , name: 'Game'     , meta: { nav: false, icon: 'videogame_asset' } },
     18     { path: '/game'          , component: PageGameList, name: 'Games'    , meta: { nav: true , icon: 'videogame_asset' } },
     19     { path: '/:catchAll(.*)' , component: PageNotFound, name: 'Not Found', meta: { nav: false, icon: 'error'           } },
     20   ]
     21 });
     22 
     23 const app = createApp(root);
     24 app.use(router);
     25 app.use(VueNotificationList);
     26 app.mount(document.body);
     27 
     28 console.log(router.getRoutes());