From d1f9018213f6550f36ba7150c822a22b285a45d7 Mon Sep 17 00:00:00 2001 From: static Date: Fri, 2 Jan 2026 00:31:58 +0900 Subject: [PATCH] =?UTF-8?q?=EC=82=AC=EC=86=8C=ED=95=9C=20=EB=A6=AC?= =?UTF-8?q?=ED=8C=A9=ED=86=A0=EB=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/atoms/RowVirtualizer.svelte | 4 +- .../organisms/Category/Category.svelte | 17 +++---- src/lib/modules/file/upload.svelte.ts | 2 +- .../(fullscreen)/file/downloads/+page.svelte | 44 ++++++++++-------- .../(fullscreen)/file/downloads/File.svelte | 4 +- .../DirectoryEntries/DirectoryEntries.svelte | 45 ++++++++----------- 6 files changed, 56 insertions(+), 60 deletions(-) diff --git a/src/lib/components/atoms/RowVirtualizer.svelte b/src/lib/components/atoms/RowVirtualizer.svelte index aa68bd2..444b9c7 100644 --- a/src/lib/components/atoms/RowVirtualizer.svelte +++ b/src/lib/components/atoms/RowVirtualizer.svelte @@ -8,10 +8,11 @@ count: number; item: Snippet<[index: number]>; itemHeight: (index: number) => number; + itemGap?: number; placeholder?: Snippet; } - let { class: className, count, item, itemHeight, placeholder }: Props = $props(); + let { class: className, count, item, itemHeight, itemGap, placeholder }: Props = $props(); let element: HTMLElement | undefined = $state(); let scrollMargin = $state(0); @@ -20,6 +21,7 @@ createWindowVirtualizer({ count, estimateSize: itemHeight, + gap: itemGap, scrollMargin, }), ); diff --git a/src/lib/components/organisms/Category/Category.svelte b/src/lib/components/organisms/Category/Category.svelte index 3728f5f..6482a16 100644 --- a/src/lib/components/organisms/Category/Category.svelte +++ b/src/lib/components/organisms/Category/Category.svelte @@ -75,19 +75,14 @@

하위 카테고리의 파일

- 48 + (index + 1 < files.length ? 4 : 0)} - > + 48} itemGap={4}> {#snippet item(index)} {@const { details } = files[index]!} -
- -
+ {/snippet} {#snippet placeholder()}

이 카테고리에 추가된 파일이 없어요.

diff --git a/src/lib/modules/file/upload.svelte.ts b/src/lib/modules/file/upload.svelte.ts index da205f3..679de5b 100644 --- a/src/lib/modules/file/upload.svelte.ts +++ b/src/lib/modules/file/upload.svelte.ts @@ -46,7 +46,7 @@ const isFileUploading = (status: FileUploadState["status"]) => export const getUploadingFiles = (parentId?: DirectoryId) => { return uploadingFiles.filter( - (file): file is LiveFileUploadState => + (file) => (parentId === undefined || file.parentId === parentId) && isFileUploading(file.status), ); }; diff --git a/src/routes/(fullscreen)/file/downloads/+page.svelte b/src/routes/(fullscreen)/file/downloads/+page.svelte index 5865db8..860901f 100644 --- a/src/routes/(fullscreen)/file/downloads/+page.svelte +++ b/src/routes/(fullscreen)/file/downloads/+page.svelte @@ -1,18 +1,29 @@ @@ -23,14 +34,11 @@ - {#await filesPromise then files} -
- {#each downloadingFiles as state} - {@const info = files.get(state.id)!} - {#if info.exists} - - {/if} - {/each} -
- {/await} +
+ {#each downloadingFiles as { info, state } (info.id)} + {#if info.exists} + + {/if} + {/each} +
diff --git a/src/routes/(fullscreen)/file/downloads/File.svelte b/src/routes/(fullscreen)/file/downloads/File.svelte index f5012bc..d70428e 100644 --- a/src/routes/(fullscreen)/file/downloads/File.svelte +++ b/src/routes/(fullscreen)/file/downloads/File.svelte @@ -1,6 +1,6 @@ {#if entries.length > 0}
- 56 + (index + 1 < entries.length ? 4 : 0)} - > + 56} itemGap={4}> {#snippet item(index)} {@const entry = entries[index]!} -
- {#if entry.type === "parent"} - - - - {:else if entry.type === "directory"} - - {:else if entry.type === "file"} - - {:else} - - {/if} -
+ {#if entry.type === "parent"} + + + + {:else if entry.type === "directory"} + + {:else if entry.type === "file"} + + {:else} + + {/if} {/snippet}