From 1ac653ad1b9f47af8cb24cb53ffa60a1e95192fc Mon Sep 17 00:00:00 2001 From: Luca <102960244+Luca-Timo@users.noreply.github.com> Date: Tue, 16 Jun 2026 15:42:10 +0200 Subject: [PATCH] fix(branding): when a force lock is active, collapse the theme customizer to just the Force control MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow-up to the force-mode change: hide ALL gallery theme customization while a force light/dark lock is on, not only colors + typography. Theme presets, gallery layout, header style, controls style, the colour pickers (incl. accent), Typography & Style, CSS templates, the PDF-typography slot and event custom CSS are all hidden — only the Force color mode control (with an explanatory note) and the Reset/Apply actions remain. Accent brand colours still apply to the gallery; their picker is just hidden while the lock is on. Turning the lock off restores the full customizer. Note text + i18n (en/de) updated. --- frontend/src/components/admin/ThemeCustomizerEnhanced.tsx | 8 ++++++-- frontend/src/i18n/locales/de.json | 2 +- frontend/src/i18n/locales/en.json | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/admin/ThemeCustomizerEnhanced.tsx b/frontend/src/components/admin/ThemeCustomizerEnhanced.tsx index eb5c1fc5..7d449635 100644 --- a/frontend/src/components/admin/ThemeCustomizerEnhanced.tsx +++ b/frontend/src/components/admin/ThemeCustomizerEnhanced.tsx @@ -311,6 +311,7 @@ export const ThemeCustomizerEnhanced: React.FC = ( return (
+ {!forcedColorActive && (<> {/* Preset Themes */}

@@ -895,6 +896,7 @@ export const ThemeCustomizerEnhanced: React.FC = ( )} )} + )} {/* Color Customization */} @@ -923,7 +925,7 @@ export const ThemeCustomizerEnhanced: React.FC = (
{forcedColorActive && (
- {t('branding.forcedStandardLookNote', 'A forced color mode is active — the gallery uses the standard light/dark look. Color mode, surface & text colors, and Typography & Style are hidden here because they don’t apply while the lock is on. Accent colors still apply. Set Force below to “No force” to customize them.')} + {t('branding.forcedStandardLookNote', 'A forced color mode is active — the gallery uses the standard light/dark look, so the theme customization is hidden (it doesn’t apply while the lock is on). Your accent brand colors still apply. Set Force to “No force” to customize the gallery theme again.')}
)} {!forcedColorActive && (<> @@ -1142,7 +1144,6 @@ export const ThemeCustomizerEnhanced: React.FC = ( ))}

- )} {/* Accent */}
@@ -1193,6 +1194,7 @@ export const ThemeCustomizerEnhanced: React.FC = ( {/* primaryColor is kept in sync with accentDarkColor inside handleChange() — no dedicated picker. */}
+ )} @@ -1330,6 +1332,7 @@ export const ThemeCustomizerEnhanced: React.FC = ( )} + {!forcedColorActive && (<> {/* CSS Template Selector - only show if templates are provided */} {cssTemplates && cssTemplates.length > 0 && onCssTemplateChange && ( @@ -1506,6 +1509,7 @@ export const ThemeCustomizerEnhanced: React.FC = ( {t('branding.customCSSHelp')}

+ )} {/* Actions */} {!hideActions && ( diff --git a/frontend/src/i18n/locales/de.json b/frontend/src/i18n/locales/de.json index 59edff14..00e96cb2 100644 --- a/frontend/src/i18n/locales/de.json +++ b/frontend/src/i18n/locales/de.json @@ -1956,7 +1956,7 @@ "forceColorModeNone": "Kein Zwang (Benutzerauswahl)", "forceColorModeDark": "Dunkelmodus erzwingen", "forceColorModeLight": "Hellmodus erzwingen", - "forcedStandardLookNote": "Ein erzwungener Farbmodus ist aktiv — die Galerie verwendet das Standard-Hell-/Dunkel-Design. Farbmodus, Flächen- & Textfarben sowie Typografie & Stil werden hier ausgeblendet, da sie bei aktiver Sperre nicht greifen. Akzentfarben gelten weiterhin. Setze „Erzwingen“ unten auf „Keine Erzwingung“, um sie anzupassen.", + "forcedStandardLookNote": "Ein erzwungener Farbmodus ist aktiv — die Galerie verwendet das Standard-Hell-/Dunkel-Design, daher ist die Theme-Anpassung ausgeblendet (sie greift bei aktiver Sperre nicht). Deine Akzent-Markenfarben gelten weiterhin. Setze „Erzwingen“ auf „Keine Erzwingung“, um das Galerie-Theme wieder anzupassen.", "colorGroupSurfaces": "Oberflächen", "colorGroupSurfacesHelp": "Die neutralen Ebenen hinter Ihrem Inhalt. Hintergrund liegt am weitesten zurück; Oberfläche und Erhöht stapeln sich darüber.", "backgroundColorHelp": "Die Seite selbst — Hintergrundfarbe jeder Galerie, Admin-Seite und CMS-Seite.", diff --git a/frontend/src/i18n/locales/en.json b/frontend/src/i18n/locales/en.json index a0707c4d..39cf9d90 100644 --- a/frontend/src/i18n/locales/en.json +++ b/frontend/src/i18n/locales/en.json @@ -1545,7 +1545,7 @@ "forceColorModeNone": "No force (user choice)", "forceColorModeDark": "Force dark", "forceColorModeLight": "Force light", - "forcedStandardLookNote": "A forced color mode is active — the gallery uses the standard light/dark look. Color mode, surface & text colors, and Typography & Style are hidden here because they don’t apply while the lock is on. Accent colors still apply. Set Force below to “No force” to customize them.", + "forcedStandardLookNote": "A forced color mode is active — the gallery uses the standard light/dark look, so the theme customization is hidden (it doesn’t apply while the lock is on). Your accent brand colors still apply. Set Force to “No force” to customize the gallery theme again.", "colorGroupSurfaces": "Surfaces", "colorGroupSurfacesHelp": "The neutral layers behind your content. Background sits furthest back; Surface and Elevated stack on top.", "backgroundColorHelp": "The page itself — body background of every gallery, admin page and CMS page.",