Refine admin PWA dark theme controls
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
tests / ui (push) Has been cancelled

This commit is contained in:
Codex Agent
2026-02-04 13:50:59 +01:00
parent 239f55f9c5
commit 66c7131d79
22 changed files with 999 additions and 110 deletions

View File

@@ -20,7 +20,7 @@ import { getApiErrorMessage } from '../lib/apiError';
import { useBackNavigation } from './hooks/useBackNavigation';
import { buildEventStatusCounts, filterEventsByStatus, resolveEventStatusKey, type EventStatusKey } from './lib/eventFilters';
import { buildEventListStats } from './lib/eventListStats';
import { useAdminTheme } from './theme';
import { useAdminTheme, withAlpha } from './theme';
import { useAuth } from '../auth/context';
export default function MobileEventsPage() {
@@ -235,7 +235,9 @@ function EventsList({
onEdit?: (slug: string) => void;
}) {
const { t } = useTranslation('management');
const { text, muted, subtle, border, primary, surface, surfaceMuted, shadow } = useAdminTheme();
const { text, muted, subtle, border, primary, surface, surfaceMuted, shadow, accentSoft } = useAdminTheme();
const activePillBg = accentSoft ?? withAlpha(primary, 0.18);
const activePillBorder = withAlpha(primary, 0.45);
const statusCounts = React.useMemo(() => buildEventStatusCounts(events), [events]);
const filteredByStatus = React.useMemo(
@@ -329,7 +331,8 @@ function EventsList({
value={filter.key}
borderRadius="$4"
borderWidth={1}
borderColor={border}
borderColor={active ? activePillBorder : border}
backgroundColor={active ? activePillBg : 'transparent'}
paddingVertical="$2"
paddingHorizontal="$3"
width="auto"
@@ -337,7 +340,7 @@ function EventsList({
flexShrink={0}
hoverStyle={{ backgroundColor: '$backgroundHover' }}
pressStyle={{ backgroundColor: '$backgroundPress' }}
activeStyle={{ backgroundColor: '$backgroundPress', borderColor: '$borderColorPress' }}
activeStyle={{ backgroundColor: activePillBg, borderColor: activePillBorder }}
>
<XStack alignItems="center" gap="$2">
<Text fontSize="$xs" fontWeight={active ? '700' : '600'} color={active ? text : muted}>