Compact tasks toggle and title
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-01-22 21:15:55 +01:00
parent ef88342bd0
commit 056d864f80
4 changed files with 18 additions and 18 deletions

View File

@@ -530,7 +530,7 @@
}, },
"tasks": { "tasks": {
"badge": "Fotoaufgaben", "badge": "Fotoaufgaben",
"title": "Fotoaufgaben & Checklisten", "title": "Fotoaufgaben für Gäste",
"subtitle": "Motiviere Gäste mit klaren Fotoaufgaben & Highlights.", "subtitle": "Motiviere Gäste mit klaren Fotoaufgaben & Highlights.",
"summary": { "summary": {
"assigned": "Zugewiesen", "assigned": "Zugewiesen",
@@ -547,13 +547,13 @@
"disabledTitle": "Fotoaufgaben-Modus ist für dieses Event aus", "disabledTitle": "Fotoaufgaben-Modus ist für dieses Event aus",
"disabledBody": "Gäste sehen nur den Fotofeed. Aktiviere Fotoaufgaben in den Event-Einstellungen, um sie wieder anzuzeigen.", "disabledBody": "Gäste sehen nur den Fotofeed. Aktiviere Fotoaufgaben in den Event-Einstellungen, um sie wieder anzuzeigen.",
"toggle": { "toggle": {
"title": "Fotoaufgaben-Modus", "title": "Fotoaufgaben für Gäste",
"description": "Steuere, ob Gäste Mission Cards und Fotoideen sehen.", "description": "Steuere, ob Gäste Mission Cards und Fotoideen sehen.",
"active": "AKTIV", "active": "AKTIV",
"inactive": "INAKTIV", "inactive": "INAKTIV",
"onLabel": "Mission Cards aktiv", "onLabel": "Mission Cards aktiv",
"offLabel": "Nur Fotofeed", "offLabel": "Nur Fotofeed",
"switchLabel": "Fotoaufgaben für Gäste", "switchLabel": "Fotoaufgaben-Modus",
"enabled": "Fotoaufgaben aktiviert", "enabled": "Fotoaufgaben aktiviert",
"disabled": "Fotoaufgaben deaktiviert", "disabled": "Fotoaufgaben deaktiviert",
"permissionHint": "Du hast keine Berechtigung, Fotoaufgaben zu ändern." "permissionHint": "Du hast keine Berechtigung, Fotoaufgaben zu ändern."

View File

@@ -526,7 +526,7 @@
}, },
"tasks": { "tasks": {
"badge": "Photo tasks", "badge": "Photo tasks",
"title": "Photo tasks & checklists", "title": "Photo tasks for guests",
"subtitle": "Motivate guests with clear photo tasks & highlights.", "subtitle": "Motivate guests with clear photo tasks & highlights.",
"summary": { "summary": {
"assigned": "Assigned", "assigned": "Assigned",
@@ -543,13 +543,13 @@
"disabledTitle": "Photo tasks mode is off for this event", "disabledTitle": "Photo tasks mode is off for this event",
"disabledBody": "Guests only see the photo feed. Enable photo tasks in the event settings to show them again.", "disabledBody": "Guests only see the photo feed. Enable photo tasks in the event settings to show them again.",
"toggle": { "toggle": {
"title": "Photo task mode", "title": "Photo tasks for guests",
"description": "Control whether guests see mission cards and prompts.", "description": "Control whether guests see mission cards and prompts.",
"active": "ACTIVE", "active": "ACTIVE",
"inactive": "INACTIVE", "inactive": "INACTIVE",
"onLabel": "Mission cards active", "onLabel": "Mission cards active",
"offLabel": "Photo feed only", "offLabel": "Photo feed only",
"switchLabel": "Photo tasks for guests", "switchLabel": "Photo task mode",
"enabled": "Photo tasks activated", "enabled": "Photo tasks activated",
"disabled": "Photo tasks disabled", "disabled": "Photo tasks disabled",
"permissionHint": "You do not have permission to change photo tasks." "permissionHint": "You do not have permission to change photo tasks."

View File

@@ -1035,7 +1035,7 @@ export default function MobileEventTasksPage() {
return ( return (
<MobileShell <MobileShell
activeTab="tasks" activeTab="tasks"
title={t('events.tasks.title', 'Photo tasks & checklists')} title={t('events.tasks.title', 'Photo tasks for guests')}
onBack={back} onBack={back}
headerActions={ headerActions={
<XStack space="$2"> <XStack space="$2">
@@ -1084,7 +1084,7 @@ export default function MobileEventTasksPage() {
<YStack space="$2"> <YStack space="$2">
<XStack alignItems="center" justifyContent="space-between" space="$2"> <XStack alignItems="center" justifyContent="space-between" space="$2">
<Text fontSize="$xs" fontWeight="700" color={text}> <Text fontSize="$xs" fontWeight="700" color={text}>
{t('events.tasks.toggle.title', 'Photo task mode')} {t('events.tasks.toggle.title', 'Photo tasks for guests')}
</Text> </Text>
<Pressable <Pressable
onPress={() => setShowTaskDetails((prev) => !prev)} onPress={() => setShowTaskDetails((prev) => !prev)}
@@ -1110,22 +1110,22 @@ export default function MobileEventTasksPage() {
<XStack <XStack
alignItems="center" alignItems="center"
justifyContent="space-between" justifyContent="space-between"
paddingHorizontal="$2.5" paddingHorizontal="$2"
paddingVertical="$2" paddingVertical="$1.5"
borderRadius={14} borderRadius={12}
borderWidth={1} borderWidth={1}
borderColor={border} borderColor={border}
backgroundColor={surface} backgroundColor={surface}
> >
<Text fontSize="$xs" fontWeight="700" color={text}> <Text fontSize="$xs" fontWeight="700" color={text}>
{t('events.tasks.toggle.switchLabel', 'Photo tasks for guests')} {t('events.tasks.toggle.switchLabel', 'Photo task mode')}
</Text> </Text>
<XStack alignItems="center" space="$2"> <XStack alignItems="center" space="$1.5">
<Switch <Switch
size="$4" size="$3"
checked={tasksEnabled} checked={tasksEnabled}
onCheckedChange={handleTasksToggle} onCheckedChange={handleTasksToggle}
aria-label={t('events.tasks.toggle.switchLabel', 'Photo tasks for guests')} aria-label={t('events.tasks.toggle.switchLabel', 'Photo task mode')}
disabled={!canManageTasks || tasksToggleBusy} disabled={!canManageTasks || tasksToggleBusy}
> >
<Switch.Thumb /> <Switch.Thumb />

View File

@@ -277,7 +277,7 @@ describe('MobileEventTasksPage', () => {
it('renders the tabs and photo task header', async () => { it('renders the tabs and photo task header', async () => {
render(<MobileEventTasksPage />); render(<MobileEventTasksPage />);
expect(await screen.findByText('Photo task mode')).toBeInTheDocument(); expect(await screen.findByText('Photo tasks for guests')).toBeInTheDocument();
expect(screen.getByRole('button', { name: 'Tasks' })).toBeInTheDocument(); expect(screen.getByRole('button', { name: 'Tasks' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: 'Task Library' })).toBeInTheDocument(); expect(screen.getByRole('button', { name: 'Task Library' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: 'Emotions' })).toBeInTheDocument(); expect(screen.getByRole('button', { name: 'Emotions' })).toBeInTheDocument();
@@ -294,7 +294,7 @@ describe('MobileEventTasksPage', () => {
render(<MobileEventTasksPage />); render(<MobileEventTasksPage />);
const detailsLabel = 'Control whether guests see mission cards and prompts.'; const detailsLabel = 'Control whether guests see mission cards and prompts.';
expect(await screen.findByText('Photo task mode')).toBeInTheDocument(); expect(await screen.findByText('Photo tasks for guests')).toBeInTheDocument();
expect(screen.queryByText(detailsLabel)).not.toBeInTheDocument(); expect(screen.queryByText(detailsLabel)).not.toBeInTheDocument();
fireEvent.click(screen.getByLabelText(detailsLabel)); fireEvent.click(screen.getByLabelText(detailsLabel));
@@ -327,7 +327,7 @@ describe('MobileEventTasksPage', () => {
render(<MobileEventTasksPage />); render(<MobileEventTasksPage />);
expect(await screen.findByText('Photo task mode')).toBeInTheDocument(); expect(await screen.findByText('Photo tasks for guests')).toBeInTheDocument();
await waitFor(() => { await waitFor(() => {
expect(screen.queryByLabelText('Add')).not.toBeInTheDocument(); expect(screen.queryByLabelText('Add')).not.toBeInTheDocument();
}); });