mirror of
https://github.com/Drop-OSS/drop-app.git
synced 2025-11-10 04:22:13 +10:00
Fixed bug with bad initial loading into store instead of auth
This commit is contained in:
5
app.vue
5
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", () => {
|
||||
|
||||
Reference in New Issue
Block a user