Adding markers to keep track of registration state

This commit is contained in:
Matthew Aaron Raymer
2022-12-19 14:19:33 +08:00
parent 05e969fbc4
commit b4557c3596
3 changed files with 67 additions and 58 deletions

View File

@@ -105,6 +105,7 @@ const routes: Array<RouteRecordRaw> = [
},
];
/** @type {*} */
const router = createRouter({
history: createWebHistory(process.env.BASE_URL),
routes,
@@ -121,14 +122,9 @@ router.beforeEach(async (to) => {
case "uninitialized":
return_path = "";
break;
case "registering":
return_path = to.path;
break;
}
} else {
switch (appStore.condition) {
case "registered":
return_path = to.path;
break;
}
}
if (return_path == "") {