Adjust branding defaults and tenant presets

This commit is contained in:
Codex Agent
2026-01-30 18:15:52 +01:00
parent b3bf45482a
commit 6e19c3d7b6
9 changed files with 592 additions and 220 deletions

View File

@@ -17,7 +17,6 @@ export type BrandingFormValues = {
buttonPrimary: string;
buttonSecondary: string;
linkColor: string;
useDefaultBranding: boolean;
};
export type BrandingFormDefaults = Pick<
@@ -26,6 +25,8 @@ export type BrandingFormDefaults = Pick<
| 'accent'
| 'background'
| 'surface'
| 'headingFont'
| 'bodyFont'
| 'mode'
| 'buttonStyle'
| 'buttonRadius'
@@ -130,8 +131,8 @@ export function extractBrandingForm(settings: unknown, defaults: BrandingFormDef
accent,
background,
surface,
headingFont: headingFont ?? '',
bodyFont: bodyFont ?? '',
headingFont: headingFont ?? defaults.headingFont ?? '',
bodyFont: bodyFont ?? defaults.bodyFont ?? '',
fontSize,
logoDataUrl: resolveAssetPreviewUrl(logoUploadValue),
logoValue,
@@ -144,6 +145,5 @@ export function extractBrandingForm(settings: unknown, defaults: BrandingFormDef
buttonPrimary,
buttonSecondary,
linkColor,
useDefaultBranding: branding.use_default_branding === true,
};
}