From b418df06f58e84bd8495b1ef7ca34c352a84bded Mon Sep 17 00:00:00 2001 From: zurdi Date: Fri, 24 Apr 2026 23:24:20 +0000 Subject: [PATCH] feat: add tile size prop to collection components for responsive layout --- frontend/src/RomM.vue | 17 ++++++++ .../Collections/CollectionPickerRow.vue | 23 ++++++++--- .../Collections/NewCollectionRow.vue | 40 +++++++++++++++---- .../Dialogs/AddRomsToCollectionDialog.vue | 2 + 4 files changed, 68 insertions(+), 14 deletions(-) diff --git a/frontend/src/RomM.vue b/frontend/src/RomM.vue index 67841d8b8..354177b38 100644 --- a/frontend/src/RomM.vue +++ b/frontend/src/RomM.vue @@ -80,6 +80,23 @@ watch( ); const isV2 = computed(() => uiVersion.value === "v2"); + +// Apply the v2 token scope to when v2 is active. Vuetify teleports +// overlays (VDialog, VMenu) into ` > .v-overlay-container` — which +// sits OUTSIDE both the AppLayout `.r-v2` wrapper AND . Putting the +// classes on means the entire document inherits the v2 CSS custom +// properties so `var(--r-color-...)` resolves inside any teleported +// dialog/menu. v1 mode strips the classes, keeping v1 CSS unaffected. +watch( + [isV2, activeThemeName], + ([v2, themeName]) => { + const root = document.documentElement; + root.classList.toggle("r-v2", v2); + root.classList.toggle("r-v2-dark", v2 && themeName === V2_THEME_DARK); + root.classList.toggle("r-v2-light", v2 && themeName === V2_THEME_LIGHT); + }, + { immediate: true }, +);