Fix event-specific themes and branding display
- Update COLOR_THEMES to include full theme configurations - Send theme as JSON string when creating events - Display company branding in gallery header - Add debug logging for theme application - Event themes now properly override global themes - Company name and tagline now visible in gallery header
This commit is contained in:
@@ -36,11 +36,66 @@ const EVENT_TYPES = [
|
||||
];
|
||||
|
||||
const COLOR_THEMES = [
|
||||
{ value: 'default', label: 'Default (Green)', color: 'bg-primary-600' },
|
||||
{ value: 'blue', label: 'Ocean Blue', color: 'bg-blue-600' },
|
||||
{ value: 'purple', label: 'Royal Purple', color: 'bg-purple-600' },
|
||||
{ value: 'rose', label: 'Rose Gold', color: 'bg-rose-600' },
|
||||
{ value: 'amber', label: 'Sunset Amber', color: 'bg-amber-600' },
|
||||
{
|
||||
value: 'default',
|
||||
label: 'Default (Green)',
|
||||
color: 'bg-primary-600',
|
||||
theme: {
|
||||
primaryColor: '#5C8762',
|
||||
accentColor: '#22c55e',
|
||||
backgroundColor: '#fafafa',
|
||||
textColor: '#171717',
|
||||
borderRadius: 'md' as const
|
||||
}
|
||||
},
|
||||
{
|
||||
value: 'blue',
|
||||
label: 'Ocean Blue',
|
||||
color: 'bg-blue-600',
|
||||
theme: {
|
||||
primaryColor: '#2563eb',
|
||||
accentColor: '#3b82f6',
|
||||
backgroundColor: '#f0f9ff',
|
||||
textColor: '#0f172a',
|
||||
borderRadius: 'md' as const
|
||||
}
|
||||
},
|
||||
{
|
||||
value: 'purple',
|
||||
label: 'Royal Purple',
|
||||
color: 'bg-purple-600',
|
||||
theme: {
|
||||
primaryColor: '#9333ea',
|
||||
accentColor: '#a855f7',
|
||||
backgroundColor: '#faf5ff',
|
||||
textColor: '#1e1b4b',
|
||||
borderRadius: 'md' as const
|
||||
}
|
||||
},
|
||||
{
|
||||
value: 'rose',
|
||||
label: 'Rose Gold',
|
||||
color: 'bg-rose-600',
|
||||
theme: {
|
||||
primaryColor: '#e11d48',
|
||||
accentColor: '#f43f5e',
|
||||
backgroundColor: '#fff1f2',
|
||||
textColor: '#881337',
|
||||
borderRadius: 'md' as const
|
||||
}
|
||||
},
|
||||
{
|
||||
value: 'amber',
|
||||
label: 'Sunset Amber',
|
||||
color: 'bg-amber-600',
|
||||
theme: {
|
||||
primaryColor: '#d97706',
|
||||
accentColor: '#f59e0b',
|
||||
backgroundColor: '#fffbeb',
|
||||
textColor: '#451a03',
|
||||
borderRadius: 'md' as const
|
||||
}
|
||||
},
|
||||
];
|
||||
|
||||
export const CreateEventPage: React.FC = () => {
|
||||
@@ -148,6 +203,8 @@ export const CreateEventPage: React.FC = () => {
|
||||
return;
|
||||
}
|
||||
|
||||
const selectedTheme = COLOR_THEMES.find(t => t.value === formData.color_theme);
|
||||
|
||||
createMutation.mutate({
|
||||
event_type: formData.event_type,
|
||||
event_name: formData.event_name,
|
||||
@@ -156,7 +213,7 @@ export const CreateEventPage: React.FC = () => {
|
||||
admin_email: formData.admin_email,
|
||||
password: formData.password,
|
||||
welcome_message: formData.welcome_message || '',
|
||||
color_theme: formData.color_theme || undefined,
|
||||
color_theme: selectedTheme ? JSON.stringify(selectedTheme.theme) : undefined,
|
||||
expiration_days: formData.expires_in_days,
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user