diff --git a/src/router/index.ts b/src/router/index.ts index 67cafdaa..9697d486 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -115,22 +115,20 @@ router.beforeEach(async (to, from, next) => { const publicPages = ["/start", "/account", "/import-account"]; const isPublic = publicPages.includes(to.path); const appStore = useAppStore(); - let return_path = "/start"; - if (to.path === "/" && appStore.condition == "registered") { - return_path = "/account"; - } - if (isPublic) { + console.log(to); + if (to.path === "/" && appStore.condition === "registered") { + next({ path: "/account" }); + } else if (isPublic) { switch (appStore.condition) { - case "uninitialized": - return_path = ""; - break; case "registered": next(); break; + default: + next(); + break; } - } - if (return_path == "") { - return; + } else if (appStore.condition === "uninitialized") { + next({ path: "/start" }); } else { next(); } diff --git a/src/views/ImportAccountView.vue b/src/views/ImportAccountView.vue index dff34e89..866c376f 100644 --- a/src/views/ImportAccountView.vue +++ b/src/views/ImportAccountView.vue @@ -14,49 +14,59 @@ -
++ Enter your seed phrase below to import your identity on this device. +
+ +