Update guest v2 home and tasks experience
This commit is contained in:
@@ -17,6 +17,7 @@ export type BrandingFormValues = {
|
||||
buttonPrimary: string;
|
||||
buttonSecondary: string;
|
||||
linkColor: string;
|
||||
welcomeMessage: string;
|
||||
};
|
||||
|
||||
export type BrandingFormDefaults = Pick<
|
||||
@@ -33,6 +34,7 @@ export type BrandingFormDefaults = Pick<
|
||||
| 'buttonPrimary'
|
||||
| 'buttonSecondary'
|
||||
| 'linkColor'
|
||||
| 'welcomeMessage'
|
||||
| 'fontSize'
|
||||
| 'logoMode'
|
||||
| 'logoPosition'
|
||||
@@ -125,6 +127,11 @@ export function extractBrandingForm(settings: unknown, defaults: BrandingFormDef
|
||||
const buttonPrimary = readHexColor(buttons.primary, readHexColor(branding.button_primary_color, primary));
|
||||
const buttonSecondary = readHexColor(buttons.secondary, readHexColor(branding.button_secondary_color, accent));
|
||||
const linkColor = readHexColor(buttons.link_color ?? buttons.linkColor, readHexColor(branding.link_color, accent));
|
||||
const welcomeMessage = typeof branding.welcome_message === 'string'
|
||||
? branding.welcome_message
|
||||
: typeof branding.welcomeMessage === 'string'
|
||||
? branding.welcomeMessage
|
||||
: defaults.welcomeMessage;
|
||||
|
||||
return {
|
||||
primary,
|
||||
@@ -145,5 +152,6 @@ export function extractBrandingForm(settings: unknown, defaults: BrandingFormDef
|
||||
buttonPrimary,
|
||||
buttonSecondary,
|
||||
linkColor,
|
||||
welcomeMessage,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user