X-Git-Url: https://git.auder.net/?a=blobdiff_plain;ds=inline;f=client%2Fsrc%2Frouter.js;h=1eb88f913a20f8b6c8a9687e9ba0538fdddd7018;hb=7aa548e72ba8a4af4e2c7f63e7723ad10d2cd3a4;hp=49f777d00ea463388aee84a18a110b85392a5c32;hpb=9330b976e02148bb89e11819070d5d818e82e522;p=vchess.git diff --git a/client/src/router.js b/client/src/router.js index 49f777d0..1eb88f91 100644 --- a/client/src/router.js +++ b/client/src/router.js @@ -55,17 +55,26 @@ const router = new Router({ component: Hall, //redirect: "/", //problem: redirection before end of AJAX request }, + { + path: "/mygames", + name: "mygames", + component: loadView("MyGames"), + }, { path: "/game/:id", name: "game", component: loadView("Game"), }, + { + path: "/analyze/:vname([a-zA-Z0-9]+)", + name: "analyze", + component: loadView("Analyze"), + }, { path: "/about", name: "about", component: loadView("About"), }, - // TODO: myGames, problemId: https://router.vuejs.org/guide/essentials/dynamic-matching.html ] }); @@ -77,9 +86,6 @@ router.beforeEach((to, from, next) => { store.state.conn.send(JSON.stringify({code: "pagechange", page: to.path})); } next(); - // TODO?: redirect to current game (through GameStorage.getCurrent()) if any? - // (and if the URL doesn't already match it) (use next("/game/GID")) - //https://router.vuejs.org/guide/advanced/navigation-guards.html#global-before-guards }); export default router;