mirror of
https://github.com/kmc7468/arkvault.git
synced 2026-02-04 16:16:55 +00:00
파일 페이지에서의 네트워크 호출 최적화
This commit is contained in:
@@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user