Merge pull request 'chore(modal): drop ?image=N soft-compat — pure overlay' (#55) from dev into main
Build images / sign-extension (push) Successful in 3s
CI / lint (push) Successful in 4s
CI / frontend-build (push) Successful in 27s
CI / backend-lint-and-test (push) Successful in 38s
Build images / build-ml (push) Successful in 2m46s
Build images / build-web (push) Successful in 2m36s
CI / intimp (push) Successful in 3m42s
CI / intapi (push) Successful in 7m25s
CI / intcore (push) Successful in 8m12s
Build images / sign-extension (push) Successful in 3s
CI / lint (push) Successful in 4s
CI / frontend-build (push) Successful in 27s
CI / backend-lint-and-test (push) Successful in 38s
Build images / build-ml (push) Successful in 2m46s
Build images / build-web (push) Successful in 2m36s
CI / intimp (push) Successful in 3m42s
CI / intapi (push) Successful in 7m25s
CI / intcore (push) Successful in 8m12s
This commit was merged in pull request #55.
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)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
<script setup>
|
||||
import { onMounted, watch } from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { useGalleryStore } from '../stores/gallery.js'
|
||||
import { useModalStore } from '../stores/modal.js'
|
||||
import GalleryGrid from '../components/gallery/GalleryGrid.vue'
|
||||
@@ -37,7 +37,6 @@ import { useGallerySelectionStore } from '../stores/gallerySelection.js'
|
||||
const store = useGalleryStore()
|
||||
const modal = useModalStore()
|
||||
const sel = useGallerySelectionStore()
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
|
||||
onMounted(async () => {
|
||||
@@ -47,20 +46,6 @@ onMounted(async () => {
|
||||
else if (!isNaN(tagId)) store.setTagFilter(tagId)
|
||||
await store.loadInitial()
|
||||
await store.loadTimeline()
|
||||
// Audit 2026-06-02: modal is now a Pinia-only overlay (see
|
||||
// G5.4 design). The previous URL↔modal sync leaked the modal
|
||||
// across route changes and re-opened it on history back/forward.
|
||||
// We still honor `?image=N` as a one-shot deep-link opener so
|
||||
// existing bookmarks / shared URLs keep working; we strip the
|
||||
// query immediately via router.replace so the URL doesn't
|
||||
// re-trigger and no history entry is added.
|
||||
const initial = parseInt(route.query.image, 10)
|
||||
if (!isNaN(initial)) {
|
||||
modal.open(initial)
|
||||
const q = { ...route.query }
|
||||
delete q.image
|
||||
router.replace({ query: q })
|
||||
}
|
||||
})
|
||||
|
||||
watch(() => route.query.tag_id, (q) => {
|
||||
|
||||
Reference in New Issue
Block a user