diff --git a/frontend/src/lib/components/ResourceList.svelte b/frontend/src/lib/components/ResourceList.svelte index 14eb4024..d2288b6f 100644 --- a/frontend/src/lib/components/ResourceList.svelte +++ b/frontend/src/lib/components/ResourceList.svelte @@ -59,6 +59,7 @@ import { files as filesStore } from '$lib/stores/files.svelte'; import { formatBytes } from '$lib/utils/format'; import { formatDate, iconNameFromClass } from '$lib/utils/display'; + import { gridColumns } from '$lib/utils/grid'; interface Props { title: string; @@ -148,6 +149,9 @@ const viewClass = $derived( filesStore.viewMode === 'grid' ? 'files-grid-view' : 'files-list-view' ); + /** Content width, for computing the grid's column count to match auto-fill. */ + let gridWidth = $state(0); + const gridCols = $derived(gridColumns(gridWidth)); // Build the list-view column track from the enabled cells. const columns = $derived( @@ -409,45 +413,35 @@ hint={emptyHint} /> {:else} -