fix: Re-update the user and app status when recieve_handshake is called (#54)

Also enabled assetProtocol for better caching in general

Signed-off-by: quexeky <git@quexeky.dev>
This commit is contained in:
quexeky
2025-06-06 12:09:44 +10:00
committed by GitHub
parent 86bce1c68d
commit 0ce55e12c5
5 changed files with 30 additions and 6 deletions

View File

@ -1,9 +1,11 @@
import { invoke } from "@tauri-apps/api/core";
import { listen } from "@tauri-apps/api/event";
import { data } from "autoprefixer";
import { AppStatus, type AppState } from "~/types";
export function setupHooks() {
const router = useRouter();
const state = useAppState();
listen("auth/processing", (event) => {
router.push("/auth/processing");
@ -15,8 +17,9 @@ export function setupHooks() {
);
});
listen("auth/finished", (event) => {
listen("auth/finished", async (event) => {
router.push("/store");
state.value = JSON.parse(await invoke("fetch_state"));
});
listen("download_error", (event) => {