mirror of
https://github.com/rommapp/romm.git
synced 2026-12-06 15:54:45 +01:00
Round-trips the active search term between Vue Router's `route.query` and the v1 galleryFilter store. URLs are now bookmarkable for the bits of state v2 actually exposes today. - New composable in `src/v2/composables/useGalleryFilterUrl/`. URL→store on mount and on every `route.query.search` change (covers browser back/forward and pasted URLs); store→URL via `router.replace` so each keystroke doesn't grow the history stack. Skips writes when desired and current already match (no feedback loop with the inverse watcher). - Plugged into Platform / Search / Collection. - Removed the manual `searchTerm.value = null` cleanups in Platform and Collection — the next gallery view's mount re-applies its own URL, so the cleanup happens implicitly. No behavioural change for navigation patterns we already supported. - Scope is intentionally narrow today (only `searchTerm` round-trips) because that's the only filter v2 surfaces. The other ~24 galleryFilter fields plug in here once the v2 filter drawer ships. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>