From d166871be86baf13be2e5e5c520b34065fe49427 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Fri, 15 May 2026 21:11:27 -0400 Subject: [PATCH] feat(fc2c-i): gallery accepts ?tag_id deep-link --- frontend/src/views/GalleryView.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frontend/src/views/GalleryView.vue b/frontend/src/views/GalleryView.vue index c2f9d72..32a4488 100644 --- a/frontend/src/views/GalleryView.vue +++ b/frontend/src/views/GalleryView.vue @@ -32,6 +32,8 @@ const router = useRouter() const route = useRoute() onMounted(async () => { + const tagId = parseInt(route.query.tag_id, 10) + if (!isNaN(tagId)) store.setTagFilter(tagId) await store.loadInitial() await store.loadTimeline() // Open modal if URL has ?image=N @@ -39,6 +41,11 @@ onMounted(async () => { if (!isNaN(initial)) modal.open(initial) }) +watch(() => route.query.tag_id, (q) => { + const tagId = parseInt(q, 10) + store.setTagFilter(isNaN(tagId) ? null : tagId) +}) + watch(() => route.query.image, (q) => { const id = parseInt(q, 10) if (!isNaN(id) && id !== modal.currentImageId) modal.open(id)