mirror of
https://github.com/Drop-OSS/drop-app.git
synced 2025-11-20 11:41:20 +10:00
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:
@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user