feat(branding): dark-mode logo variant

Add an optional dark-mode logo (branding_logo_url_dark) alongside the
main logo. Upload/remove via the logo endpoint (?variant=dark) on the
Branding settings page. Admin header (admin dark mode) and the public
gallery (dark themes) pick the dark logo when active, falling back to
the light logo when unset. PDFs keep using the light logo.
This commit is contained in:
Luca
2026-06-03 13:26:56 +02:00
parent d7f0488f6e
commit 4790ea5ccd
10 changed files with 159 additions and 16 deletions
@@ -33,7 +33,10 @@ export const AdminHeader: React.FC<AdminHeaderProps> = ({ onMenuClick }) => {
const { data: brandingSettings } = usePublicSettings();
const companyName = brandingSettings?.branding_company_name?.trim() || 'PicPeak';
const logoUrl = brandingSettings?.branding_logo_url?.trim();
// Dark-mode logo variant: use it when the admin theme is dark and a dark
// logo was uploaded; otherwise fall back to the light logo.
const logoUrl = (isDark && brandingSettings?.branding_logo_url_dark?.trim())
|| brandingSettings?.branding_logo_url?.trim();
const logoDisplayMode = brandingSettings?.branding_logo_display_mode || 'logo_and_text';
// Logo placement honours the same Branding > Logo Position setting
// the gallery does. 'sidepanel' moves the logo into the AdminSidebar