A few fixes, drop planned problems support (replaced by forum + mode analyze)
[vchess.git] / client / src / router.js
index 380ccc6..26bdee9 100644 (file)
@@ -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
   ]
 });