feat(ui): modal prev/next walks the current gallery filter (#1322)
CI / lint (push) Failing after 2s
CI / frontend-build (push) Failing after 17s
CI / integration (push) Successful in 3m43s
CI / backend-lint-and-test (push) Failing after 27s

The image modal cycled GLOBAL neighbours; now the gallery hands it a snapshot of
the currently-filtered, ordered id list so prev/next moves through exactly what
you're viewing — the filtered-playlist behaviour lost in the ImageRepo→FC move.
Generalized the modal store's post-scoped cycle into a `playlistIds` playlist
reused by both GalleryView and PostCard (falls back to global neighbours when no
playlist is passed, e.g. Explore's "open full viewer").

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CDgx8bQS5YrGRK76v8HUnM
This commit is contained in:
2026-07-06 19:02:38 -04:00
parent bae077e323
commit 3bf41ecac3
3 changed files with 38 additions and 34 deletions
+2 -2
View File
@@ -200,13 +200,13 @@ async function fullImageIds () {
}
async function openModal (imageId) {
modal.open(imageId, { postImageIds: await fullImageIds() })
modal.open(imageId, { playlistIds: await fullImageIds() })
}
async function openModalAtMore () {
const ids = await fullImageIds()
const first = ids[visibleCount.value] ?? ids[0]
if (first != null) modal.open(first, { postImageIds: ids })
if (first != null) modal.open(first, { playlistIds: ids })
}
// --- description "Show more" (text-only, in place, only when truncated) ----