SSR을 비활성화하여 SPA로 전환

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
staticandClaude Opus 5.5 committed 2026-10-11 20:49:24 +09:00
1 parent b35585c7bb
commit 35f3e92b5a
34 files changed
+152 -139

No files matched your search

-20
View File
@@ -1,8 +1,5 @@
<script lang="ts">
import { onMount } from "svelte";
import { goto as svelteGoto } from "$app/navigation";
import { getDownloadingFiles, getUploadingFiles } from "$lib/modules/file";
import { clientKeyStore, masterKeyStore } from "$lib/stores";
import "../app.css";
let { children } = $props();
@@ -12,23 +9,6 @@
e.preventDefault();
}
};
onMount(async () => {
const goto = async (url: string) => {
const whitelist = ["/auth/login", "/key", "/client/pending"];
if (!whitelist.some((path) => location.pathname.startsWith(path))) {
await svelteGoto(
`${url}?redirect=${encodeURIComponent(location.pathname + location.search)}`,
);
}
};
if (!$clientKeyStore) {
await goto("/key/generate");
} else if (!$masterKeyStore) {
await goto("/client/pending");
}
});
</script>
<svelte:window onbeforeunload={protectFileUploadAndDownload} />