fix(ui): mount ImageViewer globally so tile clicks open as overlay, not route-redirect to /gallery
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -26,16 +26,16 @@
|
||||
|
||||
<script setup>
|
||||
import { onMounted } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useShowcaseStore } from '../stores/showcase.js'
|
||||
import { useModalStore } from '../stores/modal.js'
|
||||
import MasonryGrid from '../components/discovery/MasonryGrid.vue'
|
||||
|
||||
const store = useShowcaseStore()
|
||||
const router = useRouter()
|
||||
const modal = useModalStore()
|
||||
|
||||
onMounted(() => { if (store.images.length === 0) store.fetchPage() })
|
||||
|
||||
function openImage(id) {
|
||||
router.push({ name: 'gallery', query: { image: id } })
|
||||
modal.open(id)
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user