Polish tasks hero and dialog

This commit is contained in:
Codex Agent
2026-01-22 21:10:21 +01:00
parent 086b12b4a5
commit e175cc7dde
3 changed files with 54 additions and 39 deletions

View File

@@ -581,6 +581,10 @@
"limitSkipped": "{{count}} Fotoaufgaben wegen Limit übersprungen.", "limitSkipped": "{{count}} Fotoaufgaben wegen Limit übersprungen.",
"created": "Fotoaufgabe gespeichert", "created": "Fotoaufgabe gespeichert",
"removed": "Fotoaufgabe entfernt", "removed": "Fotoaufgabe entfernt",
"remove": "Entfernen",
"removeTitle": "Fotoaufgabe entfernen?",
"removeBody": "\"{{title}}\" wird aus dem Event entfernt.",
"removeBodyFallback": "Die Fotoaufgabe wird aus dem Event entfernt.",
"imported": "Fotoaufgabenpaket importiert", "imported": "Fotoaufgabenpaket importiert",
"saveTask": "Fotoaufgabe speichern", "saveTask": "Fotoaufgabe speichern",
"add": "Hinzufügen", "add": "Hinzufügen",

View File

@@ -577,6 +577,10 @@
"limitSkipped": "Skipped {{count}} tasks due to limit.", "limitSkipped": "Skipped {{count}} tasks due to limit.",
"created": "Photo task saved", "created": "Photo task saved",
"removed": "Photo task removed", "removed": "Photo task removed",
"remove": "Remove",
"removeTitle": "Remove photo task?",
"removeBody": "This will remove \"{{title}}\" from the event.",
"removeBodyFallback": "This will remove the photo task from the event.",
"imported": "Photo task pack imported", "imported": "Photo task pack imported",
"saveTask": "Save photo task", "saveTask": "Save photo task",
"add": "Add", "add": "Add",

View File

@@ -1083,53 +1083,60 @@ 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">
<YStack space="$1" flex={1}> <Text fontSize="$xs" fontWeight="700" color={text}>
<Text fontSize="$sm" fontWeight="800" color={text}> {t('events.tasks.toggle.title', 'Photo task mode')}
{t('events.tasks.toggle.title', 'Photo task mode')} </Text>
</Text> <Pressable
</YStack> onPress={() => setShowTaskDetails((prev) => !prev)}
aria-label={t(
'events.tasks.toggle.description',
'Control whether guests see mission cards and prompts.'
)}
>
<XStack
width={30}
height={30}
borderRadius={10}
alignItems="center"
justifyContent="center"
borderWidth={1}
borderColor={showTaskDetails ? withAlpha(primary, 0.45) : border}
backgroundColor={showTaskDetails ? withAlpha(primary, 0.12) : surface}
>
<Info size={14} color={showTaskDetails ? primary : muted} />
</XStack>
</Pressable>
</XStack>
<XStack
alignItems="center"
justifyContent="space-between"
paddingHorizontal="$2.5"
paddingVertical="$2"
borderRadius={14}
borderWidth={1}
borderColor={border}
backgroundColor={surface}
>
<Text fontSize="$xs" fontWeight="700" color={text}>
{t('events.tasks.toggle.switchLabel', 'Photo tasks for guests')}
</Text>
<XStack alignItems="center" space="$2"> <XStack alignItems="center" space="$2">
<Switch
size="$4"
checked={tasksEnabled}
onCheckedChange={handleTasksToggle}
aria-label={t('events.tasks.toggle.switchLabel', 'Photo tasks for guests')}
disabled={!canManageTasks || tasksToggleBusy}
>
<Switch.Thumb />
</Switch>
<PillBadge tone={tasksEnabled ? 'success' : 'warning'}> <PillBadge tone={tasksEnabled ? 'success' : 'warning'}>
{tasksEnabled {tasksEnabled
? t('events.tasks.toggle.active', 'ACTIVE') ? t('events.tasks.toggle.active', 'ACTIVE')
: t('events.tasks.toggle.inactive', 'INACTIVE')} : t('events.tasks.toggle.inactive', 'INACTIVE')}
</PillBadge> </PillBadge>
<Pressable
onPress={() => setShowTaskDetails((prev) => !prev)}
aria-label={t(
'events.tasks.toggle.description',
'Control whether guests see mission cards and prompts.'
)}
>
<XStack
width={30}
height={30}
borderRadius={10}
alignItems="center"
justifyContent="center"
borderWidth={1}
borderColor={showTaskDetails ? withAlpha(primary, 0.45) : border}
backgroundColor={showTaskDetails ? withAlpha(primary, 0.12) : surface}
>
<Info size={14} color={showTaskDetails ? primary : muted} />
</XStack>
</Pressable>
</XStack> </XStack>
</XStack> </XStack>
<XStack alignItems="center" justifyContent="space-between" space="$2">
<Text fontSize="$sm" fontWeight="700" color={text}>
{t('events.tasks.toggle.switchLabel', 'Photo tasks for guests')}
</Text>
<Switch
size="$4"
checked={tasksEnabled}
onCheckedChange={handleTasksToggle}
aria-label={t('events.tasks.toggle.switchLabel', 'Photo tasks for guests')}
disabled={!canManageTasks || tasksToggleBusy}
>
<Switch.Thumb />
</Switch>
</XStack>
<Text fontSize="$xs" color={muted}> <Text fontSize="$xs" color={muted}>
{tasksEnabled {tasksEnabled
? t('events.tasks.toggle.onLabel', 'Mission cards active') ? t('events.tasks.toggle.onLabel', 'Mission cards active')