feat(provenance): GalleryView post_id filter + PostInfoHeader wiring

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-18 20:18:05 -04:00
parent 8abdaa4393
commit 8fe1994d8e
+11 -1
View File
@@ -11,6 +11,7 @@
<div class="fc-gallery-layout"> <div class="fc-gallery-layout">
<div class="fc-gallery-layout__main"> <div class="fc-gallery-layout__main">
<PostInfoHeader />
<EmptyState v-if="store.isEmpty" /> <EmptyState v-if="store.isEmpty" />
<GalleryGrid v-else @open="openImage" /> <GalleryGrid v-else @open="openImage" />
</div> </div>
@@ -33,6 +34,7 @@ import { useModalStore } from '../stores/modal.js'
import GalleryGrid from '../components/gallery/GalleryGrid.vue' import GalleryGrid from '../components/gallery/GalleryGrid.vue'
import TimelineSidebar from '../components/gallery/TimelineSidebar.vue' import TimelineSidebar from '../components/gallery/TimelineSidebar.vue'
import EmptyState from '../components/gallery/EmptyState.vue' import EmptyState from '../components/gallery/EmptyState.vue'
import PostInfoHeader from '../components/gallery/PostInfoHeader.vue'
import ImageViewer from '../components/modal/ImageViewer.vue' import ImageViewer from '../components/modal/ImageViewer.vue'
import BulkEditorPanel from '../components/gallery/BulkEditorPanel.vue' import BulkEditorPanel from '../components/gallery/BulkEditorPanel.vue'
import { useGallerySelectionStore } from '../stores/gallerySelection.js' import { useGallerySelectionStore } from '../stores/gallerySelection.js'
@@ -44,8 +46,10 @@ const router = useRouter()
const route = useRoute() const route = useRoute()
onMounted(async () => { onMounted(async () => {
const postId = parseInt(route.query.post_id, 10)
const tagId = parseInt(route.query.tag_id, 10) const tagId = parseInt(route.query.tag_id, 10)
if (!isNaN(tagId)) store.setTagFilter(tagId) if (!isNaN(postId)) store.setPostFilter(postId)
else if (!isNaN(tagId)) store.setTagFilter(tagId)
await store.loadInitial() await store.loadInitial()
await store.loadTimeline() await store.loadTimeline()
// Open modal if URL has ?image=N // Open modal if URL has ?image=N
@@ -59,6 +63,12 @@ watch(() => route.query.tag_id, (q) => {
store.setTagFilter(isNaN(tagId) ? null : tagId) store.setTagFilter(isNaN(tagId) ? null : tagId)
}) })
watch(() => route.query.post_id, (q) => {
sel.clear() // result set changed — selected ids are no longer valid
const postId = parseInt(q, 10)
store.setPostFilter(isNaN(postId) ? null : postId)
})
watch(() => route.query.image, (q) => { watch(() => route.query.image, (q) => {
const id = parseInt(q, 10) const id = parseInt(q, 10)
if (!isNaN(id) && id !== modal.currentImageId) modal.open(id) if (!isNaN(id) && id !== modal.currentImageId) modal.open(id)