From 5e6ab270ceca96aa9e7725d67ec1ee56a5aa2606 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Tue, 17 Oct 2023 19:47:25 +0200 Subject: [PATCH] fix(pages): adaptation du routeur --- src/router/index.ts | 38 +++++--------------------------------- 1 file changed, 5 insertions(+), 33 deletions(-) diff --git a/src/router/index.ts b/src/router/index.ts index 086e1f0..5a39119 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -1,11 +1,7 @@ import { createRouter, createWebHashHistory } from "vue-router"; import HomeView from "../views/HomeView.vue"; import RuleView from "../views/RuleView.vue"; -import JdrView from "../views/JdrView.vue"; -import FichesView from "../views/FichesView.vue"; -import ObjetsView from "../views/ObjetsView.vue"; -import EquipView from "../views/EquipView.vue"; -import ElementsView from "../views/ElementsView.vue"; +import CreaturesView from "../views/CreatureListView.vue"; const router = createRouter({ history: createWebHashHistory(import.meta.env.BASE_URL), @@ -16,39 +12,15 @@ const router = createRouter({ component: HomeView, }, { - path: "/jdr/:jdr/rules/:category/:filepath", + path: "/pages/:filepath", component: RuleView, }, { - path: "/jdr/:jdr/", - component: JdrView, - }, - { - path: "/fiches", - component: FichesView, - }, - { - path: "/about", - name: "about", - // route level code-splitting - // this generates a separate chunk (About.[hash].js) for this route - // which is lazy-loaded when the route is visited. - component: () => import("../views/AboutView.vue"), - }, - { - path: "/jdr/:jdr/inventaire/objets/", - component: ObjetsView, - }, - { - path: "/jdr/:jdr/inventaire/equipements/", - component: EquipView, - }, - { - path: "/jdr/:jdr/elements/", - component: ElementsView, + path: "/creatures/:group", + component: CreaturesView, }, ], - scrollBehavior(to, from, savedPosition) { + scrollBehavior(to) { if (to.hash) { return { el: to.hash,