preview: serve fit_1280 + tighten timeline grid padding

InlinePreview was requesting fit_1920 for both the still image and
the video poster — roughly 3× the pixel count of what the pane
actually needs. Drop to fit_1280: still sharp inside the inline
pane (which the user resizes around 300–500px tall in practice)
while cutting payload by ~⅔.

Timeline: pull the grid wrapper padding in from `p-6 pb-24` to
`pr-2 pl-2 pb-2 overflow-x-hidden` now that the SplitGrid preview
pane sits above the grid — the old generous padding existed to
breathe under a full-screen modal that no longer renders inline.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-18 23:25:10 +02:00
parent 24c449f475
commit c783f129cc
2 changed files with 109 additions and 108 deletions

View File

@@ -85,13 +85,13 @@
{#key vf.Hash} {#key vf.Hash}
<VideoPlayer <VideoPlayer
src={videoUrl(vf.Hash)} src={videoUrl(vf.Hash)}
poster={thumbUrl(pf.Hash, 'fit_1920')} poster={thumbUrl(pf.Hash, 'fit_1280')}
title={photoQuery.data.OriginalName ?? pf.Name ?? ''} title={photoQuery.data.OriginalName ?? pf.Name ?? ''}
/> />
{/key} {/key}
{:else} {:else}
<img <img
src={thumbUrl(pf.Hash, 'fit_1920')} src={thumbUrl(pf.Hash, 'fit_1280')}
alt={photoQuery.data.OriginalName ?? pf.Name ?? 'Photo'} alt={photoQuery.data.OriginalName ?? pf.Name ?? 'Photo'}
class="max-h-full max-w-full rounded-md object-contain shadow-2xl" class="max-h-full max-w-full rounded-md object-contain shadow-2xl"
/> />

View File

@@ -827,7 +827,7 @@
sampleEvery: TILE_SAMPLE, sampleEvery: TILE_SAMPLE,
}} }}
> >
<div class="p-6 pb-24"> <div class="pr-2 pl-2 pb-2 overflow-x-hidden">
{#if photosQuery.isPending} {#if photosQuery.isPending}
<SkeletonGrid /> <SkeletonGrid />
{:else if photosQuery.isError} {:else if photosQuery.isError}
@@ -841,15 +841,15 @@
{#if filters.section === "archive"} {#if filters.section === "archive"}
Archive is empty. Archive is empty.
{:else if filters.section === "review"} {:else if filters.section === "review"}
Nothing left to review. Photos PhotoPrism's indexer wasn't sure Nothing left to review. Photos PhotoPrism's indexer wasn't
about land here — use Keep to accept them into the timeline or sure about land here — use Keep to accept them into the
Archive to set them aside. timeline or Archive to set them aside.
{:else if filters.section === "hidden"} {:else if filters.section === "hidden"}
No hidden photos. PhotoPrism auto-hides files it can't index No hidden photos. PhotoPrism auto-hides files it can't index
(broken files, very low quality); they only ever show up here. (broken files, very low quality); they only ever show up here.
{:else if filters.section === "heap"} {:else if filters.section === "heap"}
This heap has no photos yet. Select some photos and use the bulk This heap has no photos yet. Select some photos and use the
bar's " Add to heap" button. bulk bar's " Add to heap" button.
{:else} {:else}
No photos. Index a folder via PhotoPrism's reindex command. No photos. Index a folder via PhotoPrism's reindex command.
{/if} {/if}
@@ -892,7 +892,8 @@
> >
{#if inWindow} {#if inWindow}
{@const sel = {@const sel =
selectedIds.has(photo.UID) || focusedUid === photo.UID} selectedIds.has(photo.UID) ||
focusedUid === photo.UID}
<PhotoTile <PhotoTile
{photo} {photo}
selected={sel} selected={sel}