X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Frouter.js;h=26bdee9441fdfb34452c6f394eff187aa71adc3d;hb=afd3240d89a2f6191fe9426960dc0c1667b40c77;hp=380ccc6cd2575301da919dd85be5a487d7fa20a9;hpb=92a523d1a74cbabcfd7d6ade45f25fa622815f0b;p=vchess.git diff --git a/client/src/router.js b/client/src/router.js index 380ccc6c..26bdee94 100644 --- a/client/src/router.js +++ b/client/src/router.js @@ -46,24 +46,35 @@ const router = new Router({ localStorage["myname"] = res.name; localStorage["myid"] = res.id; } - next("/"); + // TODO: I don't like these 2 lines, "next('/')" should be enough + window.location = "/"; + next(); } ); }, 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("Game"), + }, { path: "/about", name: "about", component: loadView("About"), }, - // TODO: myGames, problemId: https://router.vuejs.org/guide/essentials/dynamic-matching.html ] });