feature/loading #21

Merged
ilia merged 12 commits from feature/loading into main 2026-02-06 09:20:09 +00:00
Showing only changes of commit 88f4cd97f9 - Show all commits

View File

@@ -50,11 +50,9 @@ const displayRange = $derived.by(() => {
const loadedCount = Math.min(offset + limit, total);
return `Showing ${loadedCount} of ${total} fonts`;
});
</script>
{#if unifiedFontStore.isFetching || unifiedFontStore.isLoading}
<span class="ml-2 text-xs text-muted-foreground/70">(Loading...)</span>
{/if}
const isLoading = $derived(unifiedFontStore.isFetching || unifiedFontStore.isLoading);
</script>
<FontVirtualList
items={unifiedFontStore.fonts}
@@ -63,8 +61,15 @@ const displayRange = $derived.by(() => {
itemHeight={280}
useWindowScroll={true}
weight={controlManager.weight}
{isLoading}
>
{#snippet children({ item: font, isFullyVisible, isPartiallyVisible, proximity, index })}
{#snippet children({
item: font,
isFullyVisible,
isPartiallyVisible,
proximity,
index,
})}
<FontListItem {font} {isFullyVisible} {isPartiallyVisible} {proximity}>
<FontSampler {font} bind:text {index} />
</FontListItem>