Compact tasks toggle and title
This commit is contained in:
@@ -530,7 +530,7 @@
|
||||
},
|
||||
"tasks": {
|
||||
"badge": "Fotoaufgaben",
|
||||
"title": "Fotoaufgaben & Checklisten",
|
||||
"title": "Fotoaufgaben für Gäste",
|
||||
"subtitle": "Motiviere Gäste mit klaren Fotoaufgaben & Highlights.",
|
||||
"summary": {
|
||||
"assigned": "Zugewiesen",
|
||||
@@ -547,13 +547,13 @@
|
||||
"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.",
|
||||
"toggle": {
|
||||
"title": "Fotoaufgaben-Modus",
|
||||
"title": "Fotoaufgaben für Gäste",
|
||||
"description": "Steuere, ob Gäste Mission Cards und Fotoideen sehen.",
|
||||
"active": "AKTIV",
|
||||
"inactive": "INAKTIV",
|
||||
"onLabel": "Mission Cards aktiv",
|
||||
"offLabel": "Nur Fotofeed",
|
||||
"switchLabel": "Fotoaufgaben für Gäste",
|
||||
"switchLabel": "Fotoaufgaben-Modus",
|
||||
"enabled": "Fotoaufgaben aktiviert",
|
||||
"disabled": "Fotoaufgaben deaktiviert",
|
||||
"permissionHint": "Du hast keine Berechtigung, Fotoaufgaben zu ändern."
|
||||
|
||||
@@ -526,7 +526,7 @@
|
||||
},
|
||||
"tasks": {
|
||||
"badge": "Photo tasks",
|
||||
"title": "Photo tasks & checklists",
|
||||
"title": "Photo tasks for guests",
|
||||
"subtitle": "Motivate guests with clear photo tasks & highlights.",
|
||||
"summary": {
|
||||
"assigned": "Assigned",
|
||||
@@ -543,13 +543,13 @@
|
||||
"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.",
|
||||
"toggle": {
|
||||
"title": "Photo task mode",
|
||||
"title": "Photo tasks for guests",
|
||||
"description": "Control whether guests see mission cards and prompts.",
|
||||
"active": "ACTIVE",
|
||||
"inactive": "INACTIVE",
|
||||
"onLabel": "Mission cards active",
|
||||
"offLabel": "Photo feed only",
|
||||
"switchLabel": "Photo tasks for guests",
|
||||
"switchLabel": "Photo task mode",
|
||||
"enabled": "Photo tasks activated",
|
||||
"disabled": "Photo tasks disabled",
|
||||
"permissionHint": "You do not have permission to change photo tasks."
|
||||
|
||||
@@ -1035,7 +1035,7 @@ export default function MobileEventTasksPage() {
|
||||
return (
|
||||
<MobileShell
|
||||
activeTab="tasks"
|
||||
title={t('events.tasks.title', 'Photo tasks & checklists')}
|
||||
title={t('events.tasks.title', 'Photo tasks for guests')}
|
||||
onBack={back}
|
||||
headerActions={
|
||||
<XStack space="$2">
|
||||
@@ -1084,7 +1084,7 @@ export default function MobileEventTasksPage() {
|
||||
<YStack space="$2">
|
||||
<XStack alignItems="center" justifyContent="space-between" space="$2">
|
||||
<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>
|
||||
<Pressable
|
||||
onPress={() => setShowTaskDetails((prev) => !prev)}
|
||||
@@ -1110,22 +1110,22 @@ export default function MobileEventTasksPage() {
|
||||
<XStack
|
||||
alignItems="center"
|
||||
justifyContent="space-between"
|
||||
paddingHorizontal="$2.5"
|
||||
paddingVertical="$2"
|
||||
borderRadius={14}
|
||||
paddingHorizontal="$2"
|
||||
paddingVertical="$1.5"
|
||||
borderRadius={12}
|
||||
borderWidth={1}
|
||||
borderColor={border}
|
||||
backgroundColor={surface}
|
||||
>
|
||||
<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>
|
||||
<XStack alignItems="center" space="$2">
|
||||
<XStack alignItems="center" space="$1.5">
|
||||
<Switch
|
||||
size="$4"
|
||||
size="$3"
|
||||
checked={tasksEnabled}
|
||||
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}
|
||||
>
|
||||
<Switch.Thumb />
|
||||
|
||||
@@ -277,7 +277,7 @@ describe('MobileEventTasksPage', () => {
|
||||
it('renders the tabs and photo task header', async () => {
|
||||
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: 'Task Library' })).toBeInTheDocument();
|
||||
expect(screen.getByRole('button', { name: 'Emotions' })).toBeInTheDocument();
|
||||
@@ -294,7 +294,7 @@ describe('MobileEventTasksPage', () => {
|
||||
render(<MobileEventTasksPage />);
|
||||
|
||||
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();
|
||||
|
||||
fireEvent.click(screen.getByLabelText(detailsLabel));
|
||||
@@ -327,7 +327,7 @@ describe('MobileEventTasksPage', () => {
|
||||
|
||||
render(<MobileEventTasksPage />);
|
||||
|
||||
expect(await screen.findByText('Photo task mode')).toBeInTheDocument();
|
||||
expect(await screen.findByText('Photo tasks for guests')).toBeInTheDocument();
|
||||
await waitFor(() => {
|
||||
expect(screen.queryByLabelText('Add')).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user