From 943e649fbc9b2e6c9cc33ffca5f6d2798c00fbdf Mon Sep 17 00:00:00 2001 From: quexeky Date: Thu, 17 Oct 2024 21:14:10 +1100 Subject: [PATCH] Fixed bug with bad initial loading into store instead of auth --- desktop/app.vue | 5 ++++- desktop/pages/index.vue | 2 -- desktop/src-tauri/src/db.rs | 7 ++++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/desktop/app.vue b/desktop/app.vue index b60f381a..a146950f 100644 --- a/desktop/app.vue +++ b/desktop/app.vue @@ -10,6 +10,7 @@ import { invoke } from "@tauri-apps/api/core"; import { AppStatus, type AppState } from "./types.d.ts"; import { listen } from "@tauri-apps/api/event"; import { useAppState } from "./composables/app-state.js"; +import {useRouter} from "#vue-router"; const router = useRouter(); @@ -22,7 +23,7 @@ router.beforeEach(async () => { switch (state.value.status) { case AppStatus.NotConfigured: - router.push("/setup"); + router.push({ path: "/setup" }).then(() => {console.log("Pushed Setup")}); break; case AppStatus.SignedOut: router.push("/auth"); @@ -30,6 +31,8 @@ switch (state.value.status) { case AppStatus.SignedInNeedsReauth: router.push("/auth/signedout"); break; + default: + router.push("/store"); } listen("auth/processing", () => { diff --git a/desktop/pages/index.vue b/desktop/pages/index.vue index bba5f6e6..72433aeb 100644 --- a/desktop/pages/index.vue +++ b/desktop/pages/index.vue @@ -1,6 +1,4 @@