- beforeEnter: (to, from, next) => {
- ajax(
- "/logout",
- "GET",
- () => {
- store.state.user.id = 0;
- store.state.user.name = ""; //TODO: localStorage myId myname mysid ?
- }
- );
- next();
- },
- redirect: "/",
+ component: loadView("Logout"),
+ },
+ {
+ path: "/mygames",
+ name: "mygames",
+ component: loadView("MyGames"),
+ },
+ {
+ path: "/game/:id([a-zA-Z0-9]+)",
+ name: "game",
+ component: loadView("Game"),
+ },
+ {
+ path: "/analyse/:vname([a-zA-Z0-9]+)",
+ name: "analyse",
+ component: loadView("Analyse"),
+ },
+ {
+ path: "/about",
+ name: "about",
+ component: loadView("About"),