Update default branding palette for tenants and guests
This commit is contained in:
@@ -1025,10 +1025,10 @@ class EventPublicController extends BaseController
|
||||
private function resolveBrandingPayload(Event $event): array
|
||||
{
|
||||
$defaults = [
|
||||
'primary' => '#f43f5e',
|
||||
'secondary' => '#fb7185',
|
||||
'background' => '#ffffff',
|
||||
'surface' => '#ffffff',
|
||||
'primary' => '#FF5A5F',
|
||||
'secondary' => '#FFF8F5',
|
||||
'background' => '#FFF8F5',
|
||||
'surface' => '#FFF8F5',
|
||||
'font' => null,
|
||||
'size' => 'm',
|
||||
'logo_position' => 'left',
|
||||
|
||||
@@ -113,8 +113,8 @@ class SettingsController extends Controller
|
||||
$defaultSettings = [
|
||||
'branding' => [
|
||||
'logo_url' => null,
|
||||
'primary_color' => '#3B82F6',
|
||||
'secondary_color' => '#1F2937',
|
||||
'primary_color' => '#FF5A5F',
|
||||
'secondary_color' => '#FFF8F5',
|
||||
'font_family' => 'Inter, sans-serif',
|
||||
],
|
||||
'features' => [
|
||||
|
||||
@@ -108,8 +108,8 @@ class CheckoutController extends Controller
|
||||
'settings' => json_encode([
|
||||
'branding' => [
|
||||
'logo_url' => null,
|
||||
'primary_color' => '#3B82F6',
|
||||
'secondary_color' => '#1F2937',
|
||||
'primary_color' => '#FF5A5F',
|
||||
'secondary_color' => '#FFF8F5',
|
||||
'font_family' => 'Inter, sans-serif',
|
||||
],
|
||||
'features' => [
|
||||
|
||||
@@ -146,8 +146,8 @@ class CheckoutGoogleController extends Controller
|
||||
'settings' => json_encode([
|
||||
'branding' => [
|
||||
'logo_url' => null,
|
||||
'primary_color' => '#3B82F6',
|
||||
'secondary_color' => '#1F2937',
|
||||
'primary_color' => '#FF5A5F',
|
||||
'secondary_color' => '#FFF8F5',
|
||||
'font_family' => 'Inter, sans-serif',
|
||||
],
|
||||
'features' => [
|
||||
|
||||
@@ -58,8 +58,8 @@ class TestGuestEventController extends Controller
|
||||
'date' => ($validated['date'] ?? Carbon::now()->addWeeks(2)->toDateString()),
|
||||
'settings' => [
|
||||
'branding' => [
|
||||
'primary_color' => '#f43f5e',
|
||||
'secondary_color' => '#fb7185',
|
||||
'primary_color' => '#FF5A5F',
|
||||
'secondary_color' => '#FFF8F5',
|
||||
'font_family' => 'Inter, sans-serif',
|
||||
],
|
||||
],
|
||||
|
||||
@@ -28,8 +28,8 @@ class TenantFactory extends Factory
|
||||
'settings' => json_encode([
|
||||
'branding' => [
|
||||
'logo_url' => null,
|
||||
'primary_color' => '#3B82F6',
|
||||
'secondary_color' => '#1F2937',
|
||||
'primary_color' => '#FF5A5F',
|
||||
'secondary_color' => '#FFF8F5',
|
||||
'font_family' => 'Inter, sans-serif',
|
||||
],
|
||||
'features' => [
|
||||
|
||||
@@ -76,8 +76,8 @@ class DemoTenantSeeder extends Seeder
|
||||
'contact_email' => $user->email,
|
||||
'branding' => [
|
||||
'logo_url' => null,
|
||||
'primary_color' => '#f43f5e',
|
||||
'secondary_color' => '#1f2937',
|
||||
'primary_color' => '#FF5A5F',
|
||||
'secondary_color' => '#FFF8F5',
|
||||
],
|
||||
],
|
||||
]
|
||||
|
||||
@@ -20,9 +20,9 @@ vi.mock('../../i18n/useTranslation', () => ({
|
||||
vi.mock('../../context/EventBrandingContext', () => ({
|
||||
useEventBranding: () => ({
|
||||
branding: {
|
||||
primaryColor: '#f43f5e',
|
||||
secondaryColor: '#fb7185',
|
||||
buttons: { radius: 12, linkColor: '#fb7185' },
|
||||
primaryColor: '#FF5A5F',
|
||||
secondaryColor: '#FFF8F5',
|
||||
buttons: { radius: 12, linkColor: '#FFF8F5' },
|
||||
typography: {},
|
||||
fontFamily: 'Montserrat',
|
||||
},
|
||||
|
||||
@@ -7,16 +7,16 @@ type EventBrandingContextValue = {
|
||||
};
|
||||
|
||||
export const DEFAULT_EVENT_BRANDING: EventBranding = {
|
||||
primaryColor: '#f43f5e',
|
||||
secondaryColor: '#fb7185',
|
||||
backgroundColor: '#ffffff',
|
||||
primaryColor: '#FF5A5F',
|
||||
secondaryColor: '#FFF8F5',
|
||||
backgroundColor: '#FFF8F5',
|
||||
fontFamily: 'Montserrat, Inter, "Helvetica Neue", system-ui, -apple-system, BlinkMacSystemFont, sans-serif',
|
||||
logoUrl: null,
|
||||
palette: {
|
||||
primary: '#f43f5e',
|
||||
secondary: '#fb7185',
|
||||
background: '#ffffff',
|
||||
surface: '#ffffff',
|
||||
primary: '#FF5A5F',
|
||||
secondary: '#FFF8F5',
|
||||
background: '#FFF8F5',
|
||||
surface: '#FFF8F5',
|
||||
},
|
||||
typography: {
|
||||
heading: 'Playfair Display, "Times New Roman", serif',
|
||||
|
||||
@@ -100,8 +100,8 @@ export default function PublicGalleryPage(): React.ReactElement | null {
|
||||
}
|
||||
|
||||
const palette = state.meta.branding.palette ?? {};
|
||||
const primary = palette.primary ?? state.meta.branding.primary_color ?? '#f43f5e';
|
||||
const secondary = palette.secondary ?? state.meta.branding.secondary_color ?? '#fb7185';
|
||||
const primary = palette.primary ?? state.meta.branding.primary_color ?? '#FF5A5F';
|
||||
const secondary = palette.secondary ?? state.meta.branding.secondary_color ?? '#FFF8F5';
|
||||
const background = palette.background ?? state.meta.branding.background_color ?? '#ffffff';
|
||||
const surface = palette.surface ?? state.meta.branding.surface_color ?? background;
|
||||
const mode = state.meta.branding.mode ?? 'auto';
|
||||
|
||||
@@ -7,8 +7,8 @@ import { MissionActionCard } from '../HomePage';
|
||||
vi.mock('../../context/EventBrandingContext', () => ({
|
||||
useEventBranding: () => ({
|
||||
branding: {
|
||||
primaryColor: '#f43f5e',
|
||||
secondaryColor: '#fb7185',
|
||||
primaryColor: '#FF5A5F',
|
||||
secondaryColor: '#FFF8F5',
|
||||
buttons: { radius: 12 },
|
||||
typography: {},
|
||||
fontFamily: 'Montserrat',
|
||||
@@ -18,7 +18,7 @@ vi.mock('../../context/EventBrandingContext', () => ({
|
||||
|
||||
vi.mock('../../lib/emotionTheme', () => ({
|
||||
getEmotionTheme: () => ({
|
||||
gradientBackground: 'linear-gradient(135deg, #f43f5e, #fb7185)',
|
||||
gradientBackground: 'linear-gradient(135deg, #FF5A5F, #FFF8F5)',
|
||||
}),
|
||||
getEmotionIcon: () => '🙂',
|
||||
}));
|
||||
|
||||
@@ -29,8 +29,8 @@ describe('UploadActionCard', () => {
|
||||
<MemoryRouter>
|
||||
<UploadActionCard
|
||||
token="demo"
|
||||
accentColor="#f43f5e"
|
||||
secondaryAccent="#fb7185"
|
||||
accentColor="#FF5A5F"
|
||||
secondaryAccent="#FFF8F5"
|
||||
radius={12}
|
||||
requiresApproval={false}
|
||||
/>
|
||||
|
||||
@@ -41,8 +41,8 @@ vi.mock('../../context/EventStatsContext', () => ({
|
||||
vi.mock('../../context/EventBrandingContext', () => ({
|
||||
useEventBranding: () => ({
|
||||
branding: {
|
||||
primaryColor: '#f43f5e',
|
||||
secondaryColor: '#fb7185',
|
||||
primaryColor: '#FF5A5F',
|
||||
secondaryColor: '#FFF8F5',
|
||||
buttons: { radius: 12 },
|
||||
typography: {},
|
||||
fontFamily: 'Montserrat',
|
||||
|
||||
@@ -41,8 +41,8 @@ vi.mock('../../context/EventStatsContext', () => ({
|
||||
vi.mock('../../context/EventBrandingContext', () => ({
|
||||
useEventBranding: () => ({
|
||||
branding: {
|
||||
primaryColor: '#f43f5e',
|
||||
secondaryColor: '#fb7185',
|
||||
primaryColor: '#FF5A5F',
|
||||
secondaryColor: '#FFF8F5',
|
||||
buttons: { radius: 12 },
|
||||
typography: {},
|
||||
fontFamily: 'Montserrat',
|
||||
|
||||
@@ -38,7 +38,7 @@ class SettingsApiTest extends TenantTestCase
|
||||
|
||||
$response->assertStatus(200)
|
||||
->assertJson(['message' => 'Settings erfolgreich abgerufen.'])
|
||||
->assertJsonPath('data.settings.branding.primary_color', '#3B82F6')
|
||||
->assertJsonPath('data.settings.branding.primary_color', '#FF5A5F')
|
||||
->assertJsonPath('data.settings.features.photo_likes_enabled', true);
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ class SettingsApiTest extends TenantTestCase
|
||||
|
||||
$response->assertStatus(200)
|
||||
->assertJson(['message' => 'Settings auf Standardwerte zurueckgesetzt.'])
|
||||
->assertJsonPath('data.settings.branding.primary_color', '#3B82F6')
|
||||
->assertJsonPath('data.settings.branding.primary_color', '#FF5A5F')
|
||||
->assertJsonPath('data.settings.features.photo_likes_enabled', true);
|
||||
|
||||
$this->assertDatabaseHas('tenants', [
|
||||
@@ -109,8 +109,8 @@ class SettingsApiTest extends TenantTestCase
|
||||
'settings' => json_encode([
|
||||
'branding' => [
|
||||
'logo_url' => null,
|
||||
'primary_color' => '#3B82F6',
|
||||
'secondary_color' => '#1F2937',
|
||||
'primary_color' => '#FF5A5F',
|
||||
'secondary_color' => '#FFF8F5',
|
||||
'font_family' => 'Inter, sans-serif',
|
||||
],
|
||||
'features' => [
|
||||
@@ -185,7 +185,7 @@ class SettingsApiTest extends TenantTestCase
|
||||
$response = $this->authenticatedRequest('GET', '/api/v1/tenant/settings');
|
||||
|
||||
$response->assertStatus(200)
|
||||
->assertJsonPath('data.settings.branding.primary_color', '#3B82F6') // Default for this tenant
|
||||
->assertJsonPath('data.settings.branding.primary_color', '#FF5A5F') // Default for this tenant
|
||||
->assertJsonMissing(['#FF0000']); // Other tenant's color
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user