chore(modal): drop the ?image=N soft-compat from G5.4
Operator confirmed they have no existing ?image=N bookmarks to preserve, so the soft-compat read on initial mount + router.replace strip is dead weight. The modal is now purely a Pinia overlay — no URL involvement on open OR initial mount. Drops 33 lines plus the now-unused vue-router imports in both ArtistGalleryTab (entire onMounted gone) and GalleryView (just the ?image=N block; the post_id/tag_id filter handling stays).
This commit is contained in:
@@ -11,9 +11,6 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onMounted } from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
|
||||
import { useArtistStore } from '../../stores/artist.js'
|
||||
import { useModalStore } from '../../stores/modal.js'
|
||||
import MasonryGrid from '../discovery/MasonryGrid.vue'
|
||||
@@ -24,21 +21,6 @@ const props = defineProps({
|
||||
|
||||
const store = useArtistStore()
|
||||
const modal = useModalStore()
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
|
||||
onMounted(() => {
|
||||
// Audit 2026-06-02: same overlay treatment as GalleryView —
|
||||
// honor `?image=N` once for backward-compat, then strip the
|
||||
// query and let the modal live in Pinia-only state.
|
||||
const initial = parseInt(route.query.image, 10)
|
||||
if (!isNaN(initial)) {
|
||||
modal.open(initial)
|
||||
const q = { ...route.query }
|
||||
delete q.image
|
||||
router.replace({ query: q })
|
||||
}
|
||||
})
|
||||
|
||||
function openImage (id) {
|
||||
modal.open(id)
|
||||
|
||||
Reference in New Issue
Block a user