From 56a39d0535922acd6394a332012be40b3df720d0 Mon Sep 17 00:00:00 2001 From: Codex Agent Date: Wed, 4 Feb 2026 11:44:07 +0100 Subject: [PATCH] Align admin mobile colors with Tamagui v2 tokens --- resources/js/admin/mobile/DashboardPage.tsx | 5 ++-- .../js/admin/mobile/EventControlRoomPage.tsx | 6 ++--- .../admin/mobile/components/MobileShell.tsx | 26 +++++++++++-------- .../components/__tests__/MobileShell.test.tsx | 9 +++++++ resources/js/admin/mobile/theme.ts | 4 +-- .../admin/mobile/welcome/WelcomeEventPage.tsx | 14 +++++----- .../mobile/welcome/WelcomeLandingPage.tsx | 11 ++++---- .../mobile/welcome/WelcomeSummaryPage.tsx | 26 ++++++++++--------- 8 files changed, 60 insertions(+), 41 deletions(-) diff --git a/resources/js/admin/mobile/DashboardPage.tsx b/resources/js/admin/mobile/DashboardPage.tsx index 42780260..6055b4a6 100644 --- a/resources/js/admin/mobile/DashboardPage.tsx +++ b/resources/js/admin/mobile/DashboardPage.tsx @@ -316,6 +316,7 @@ function LifecycleHero({ const isPostEvent = phase === 'post'; const showQuickControls = canManage && !isPostEvent; const displayStatus = event.status === 'archived' ? 'archived' : published ? 'published' : 'draft'; + const liveGradient = `linear-gradient(135deg, ${theme.primary} 0%, ${theme.accent} 100%)`; // Header Row const Header = () => ( @@ -338,13 +339,13 @@ function LifecycleHero({ padding={cardPadding} backgroundColor={theme.primary} borderColor="transparent" - style={{ backgroundImage: 'linear-gradient(135deg, #4F46E5 0%, #4338CA 100%)' }} + style={{ backgroundImage: liveGradient }} > - + {t('dashboard:liveNow.status', 'Happening Now')} diff --git a/resources/js/admin/mobile/EventControlRoomPage.tsx b/resources/js/admin/mobile/EventControlRoomPage.tsx index bdecc225..00a4da60 100644 --- a/resources/js/admin/mobile/EventControlRoomPage.tsx +++ b/resources/js/admin/mobile/EventControlRoomPage.tsx @@ -148,9 +148,9 @@ function PhotoGridTile({ badges: string[]; isBusy: boolean; }) { - const { border, muted, surfaceMuted } = useAdminTheme(); - const overlayBg = withAlpha('#0f172a', 0.55); - const actionBg = withAlpha('#0f172a', 0.55); + const { border, muted, surfaceMuted, overlay } = useAdminTheme(); + const overlayBg = overlay; + const actionBg = overlay; return (
([]); const [loadingEvents, setLoadingEvents] = React.useState(false); @@ -144,7 +148,7 @@ export function MobileShell({ title, subtitle, children, activeTab, onBack, head const EventContextPill = () => { if (!effectiveActive || isEventsIndex || isCompactHeader) { return ( - + {pageTitle} ); @@ -158,7 +162,7 @@ export function MobileShell({ title, subtitle, children, activeTab, onBack, head fontSize="$lg" fontWeight="700" fontFamily="$display" - color="white" + color={headerText} numberOfLines={1} ellipsizeMode="tail" > @@ -170,7 +174,7 @@ export function MobileShell({ title, subtitle, children, activeTab, onBack, head return ( setSwitcherOpen(true)} aria-label={t('header.eventSwitcher', 'Switch event')}> {displayName} - + ); @@ -200,7 +204,7 @@ export function MobileShell({ title, subtitle, children, activeTab, onBack, head const headerBackButton = onBack ? ( - + ) : ( diff --git a/resources/js/admin/mobile/components/__tests__/MobileShell.test.tsx b/resources/js/admin/mobile/components/__tests__/MobileShell.test.tsx index 13329f61..9f800929 100644 --- a/resources/js/admin/mobile/components/__tests__/MobileShell.test.tsx +++ b/resources/js/admin/mobile/components/__tests__/MobileShell.test.tsx @@ -40,6 +40,10 @@ vi.mock('@tamagui/react-native-web-lite', () => ({ })); vi.mock('tamagui', () => ({ + YStack: ({ children, ...props }: { children: React.ReactNode }) =>
{children}
, + XStack: ({ children, ...props }: { children: React.ReactNode }) =>
{children}
, + SizableText: ({ children, ...props }: { children: React.ReactNode }) => {children}, + Image: ({ src, ...props }: { src?: string }) => , Separator: ({ children }: { children?: React.ReactNode }) =>
{children}
, Tabs: Object.assign(({ children }: { children: React.ReactNode }) =>
{children}
, { List: ({ children }: { children: React.ReactNode }) =>
{children}
, @@ -50,6 +54,7 @@ vi.mock('tamagui', () => ({ vi.mock('../BottomNav', () => ({ BottomNav: () =>
, + BOTTOM_NAV_HEIGHT: 70, NavKey: {}, })); @@ -57,6 +62,10 @@ vi.mock('../UserMenuSheet', () => ({ UserMenuSheet: () =>
, })); +vi.mock('../EventSwitcherSheet', () => ({ + EventSwitcherSheet: () =>
, +})); + const baseEvent: TenantEvent = { id: 1, name: 'Test Event', diff --git a/resources/js/admin/mobile/theme.ts b/resources/js/admin/mobile/theme.ts index b4b2bc9a..d5244d45 100644 --- a/resources/js/admin/mobile/theme.ts +++ b/resources/js/admin/mobile/theme.ts @@ -1,8 +1,8 @@ import { useTheme, useThemeName } from '@tamagui/core'; export const ADMIN_COLORS = { - primary: '#4F46E5', // Indigo 600 - primaryStrong: '#4338CA', // Indigo 700 + primary: '#FF5A5F', // Brand Rose + primaryStrong: '#F43F5E', // Rose 500 accent: '#F43F5E', // Rose 500 accentSoft: '#E0E7FF', // Indigo 100 accentWarm: '#FFE4E6', // Rose 100 diff --git a/resources/js/admin/mobile/welcome/WelcomeEventPage.tsx b/resources/js/admin/mobile/welcome/WelcomeEventPage.tsx index 4ceecdf5..edff02f7 100644 --- a/resources/js/admin/mobile/welcome/WelcomeEventPage.tsx +++ b/resources/js/admin/mobile/welcome/WelcomeEventPage.tsx @@ -10,11 +10,12 @@ import { MobileCard, CTAButton } from '../components/Primitives'; import { ADMIN_HOME_PATH, ADMIN_WELCOME_BASE_PATH, ADMIN_WELCOME_PACKAGES_PATH, ADMIN_WELCOME_SUMMARY_PATH, adminPath } from '../../constants'; import { getTenantPackagesOverview, trackOnboarding } from '../../api'; import { getSelectedPackageId } from '../lib/onboardingSelection'; -import { ADMIN_COLORS } from '../theme'; +import { useAdminTheme } from '../theme'; export default function WelcomeEventPage() { const navigate = useNavigate(); const { t } = useTranslation('onboarding'); + const theme = useAdminTheme(); const selectedId = getSelectedPackageId(); const { data: overview } = useQuery({ @@ -54,7 +55,7 @@ export default function WelcomeEventPage() { {t('eventSetup.step.title', 'Event setup in minutes')} - + {t( 'eventSetup.step.description', 'We guide you through name, date, mood, and tasks. Afterwards you can moderate photos and support guests live.', @@ -83,7 +84,7 @@ export default function WelcomeEventPage() { {t('eventSetup.cta.heading', 'Ready for your first event?')} - + {t( 'eventSetup.cta.description', "You're switching to the event manager. Assign tasks, invite members, and test the gallery. You can always return to the welcome journey.", @@ -120,23 +121,24 @@ function FeatureRow({ title: string; body: string; }) { + const theme = useAdminTheme(); return ( - + {title} - + {body} diff --git a/resources/js/admin/mobile/welcome/WelcomeLandingPage.tsx b/resources/js/admin/mobile/welcome/WelcomeLandingPage.tsx index 3df7113a..82d1da3d 100644 --- a/resources/js/admin/mobile/welcome/WelcomeLandingPage.tsx +++ b/resources/js/admin/mobile/welcome/WelcomeLandingPage.tsx @@ -15,12 +15,13 @@ import { ADMIN_WELCOME_PACKAGES_PATH, adminPath, } from '../../constants'; -import { ADMIN_COLORS } from '../theme'; +import { useAdminTheme } from '../theme'; export default function WelcomeLandingPage() { const navigate = useNavigate(); const { t } = useTranslation('onboarding'); const { hasEvents } = useEventContext(); + const theme = useAdminTheme(); const { data: packagesData } = useQuery({ queryKey: ['mobile', 'onboarding', 'packages-overview'], @@ -53,7 +54,7 @@ export default function WelcomeLandingPage() { {t('hero.title', 'Design the next Fotospiel experience')} - + {t( 'hero.description', 'In just a few steps you guide guests through a magical photo journey – complete with storytelling, tasks, and a moderated gallery.', @@ -124,11 +125,11 @@ function FeatureCard({ width={36} height={36} borderRadius={12} - backgroundColor={ADMIN_COLORS.accentSoft} + backgroundColor={theme.accentSoft} alignItems="center" justifyContent="center" > - + {title} @@ -136,7 +137,7 @@ function FeatureCard({ {badge ? {badge} : null} - + {body} diff --git a/resources/js/admin/mobile/welcome/WelcomeSummaryPage.tsx b/resources/js/admin/mobile/welcome/WelcomeSummaryPage.tsx index 16dc29b3..95ec0e69 100644 --- a/resources/js/admin/mobile/welcome/WelcomeSummaryPage.tsx +++ b/resources/js/admin/mobile/welcome/WelcomeSummaryPage.tsx @@ -10,7 +10,7 @@ import { MobileCard, CTAButton, PillBadge } from '../components/Primitives'; import { getPackages, getTenantPackagesOverview } from '../../api'; import { ADMIN_WELCOME_BASE_PATH, ADMIN_WELCOME_EVENT_PATH, ADMIN_WELCOME_PACKAGES_PATH, adminPath } from '../../constants'; import { getSelectedPackageId } from '../lib/onboardingSelection'; -import { ADMIN_COLORS } from '../theme'; +import { useAdminTheme } from '../theme'; type SummaryPackage = { id: number; @@ -25,6 +25,7 @@ type SummaryPackage = { export default function WelcomeSummaryPage() { const navigate = useNavigate(); const { t } = useTranslation('onboarding'); + const theme = useAdminTheme(); const selectedId = getSelectedPackageId(); const { data: catalog, isLoading: catalogLoading } = useQuery({ @@ -79,7 +80,7 @@ export default function WelcomeSummaryPage() { > {loading ? ( - + {t('summary.state.loading', 'Checking available packages …')} @@ -88,7 +89,7 @@ export default function WelcomeSummaryPage() { {t('summary.state.missingTitle', 'No package selected')} - + {t('summary.state.missingDescription', 'Select a package first or refresh if data changed.')} navigate(ADMIN_WELCOME_PACKAGES_PATH)} /> @@ -101,17 +102,17 @@ export default function WelcomeSummaryPage() { width={36} height={36} borderRadius={12} - backgroundColor={ADMIN_COLORS.accentSoft} + backgroundColor={theme.accentSoft} alignItems="center" justifyContent="center" > - + {resolvedPackage.name} - + {resolvedPackage.active ? t('summary.details.section.statusActive', 'Already purchased') : t('summary.details.section.statusInactive', 'Not purchased yet')} @@ -149,8 +150,8 @@ export default function WelcomeSummaryPage() { {resolvedPackage.active ? ( - - + + {t('summary.details.section.statusActive', 'Already purchased')} @@ -172,10 +173,10 @@ export default function WelcomeSummaryPage() { ], }) as string[]).map((item) => ( - + - + {item} @@ -202,12 +203,13 @@ export default function WelcomeSummaryPage() { } function SummaryRow({ label, value }: { label: string; value: string }) { + const theme = useAdminTheme(); return ( - + {label} - + {value}