파일 페이지에서의 네트워크 호출 최적화

This commit is contained in:
static
2025-12-30 23:30:50 +09:00
parent b5522a4c6d
commit e4413ddbf6
24 changed files with 521 additions and 618 deletions

View File

@@ -1,23 +1,14 @@
<script lang="ts">
import { onMount } from "svelte";
import { get } from "svelte/store";
import { goto as svelteGoto } from "$app/navigation";
import { getUploadingFiles } from "$lib/modules/file";
import {
fileDownloadStatusStore,
isFileDownloading,
clientKeyStore,
masterKeyStore,
} from "$lib/stores";
import { getDownloadingFiles, getUploadingFiles } from "$lib/modules/file";
import { clientKeyStore, masterKeyStore } from "$lib/stores";
import "../app.css";
let { children } = $props();
const protectFileUploadAndDownload = (e: BeforeUnloadEvent) => {
if (
getUploadingFiles().length > 0 ||
$fileDownloadStatusStore.some((status) => isFileDownloading(get(status).status))
) {
if (getDownloadingFiles().length > 0 || getUploadingFiles().length > 0) {
e.preventDefault();
}
};