Tighten tasks tab 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-01-22 20:59:25 +01:00
parent 32644eb41e
commit c1dfbaa51e

View File

@@ -87,9 +87,6 @@ export default function MobileEventTasksPage() {
glassBorder, glassBorder,
glassShadow, glassShadow,
} = useAdminTheme(); } = useAdminTheme();
const stickySurface = glassSurface ?? surface;
const stickyBorder = glassBorder ?? border;
const stickyShadow = glassShadow ?? shadow;
const isMember = user?.role === 'member'; const isMember = user?.role === 'member';
const [assignedTasks, setAssignedTasks] = React.useState<TenantTask[]>([]); const [assignedTasks, setAssignedTasks] = React.useState<TenantTask[]>([]);
const [library, setLibrary] = React.useState<TenantTask[]>([]); const [library, setLibrary] = React.useState<TenantTask[]>([]);
@@ -818,11 +815,17 @@ export default function MobileEventTasksPage() {
<Text fontSize="$sm" fontWeight="700" color={text}> <Text fontSize="$sm" fontWeight="700" color={text}>
{t('events.tasks.tabs.library', 'Task Library')} {t('events.tasks.tabs.library', 'Task Library')}
</Text> </Text>
<Pressable onPress={() => setActiveTab('collections')}> <Button
<Text fontSize={12} fontWeight="600" color={primary}> size="$2"
backgroundColor={withAlpha(primary, 0.12)}
borderWidth={1}
borderColor={withAlpha(primary, 0.35)}
onPress={() => setActiveTab('collections')}
>
<Text fontSize="$xs" fontWeight="700" color={primary}>
{t('events.tasks.import', 'Import photo task pack')} {t('events.tasks.import', 'Import photo task pack')}
</Text> </Text>
</Pressable> </Button>
</XStack> </XStack>
{!canAddTasks ? ( {!canAddTasks ? (
<Text fontSize={12} fontWeight="600" color={dangerText}> <Text fontSize={12} fontWeight="600" color={dangerText}>
@@ -966,15 +969,21 @@ export default function MobileEventTasksPage() {
<Text fontSize="$sm" fontWeight="700" color={text}> <Text fontSize="$sm" fontWeight="700" color={text}>
{t('events.tasks.tabs.emotions', 'Emotions')} {t('events.tasks.tabs.emotions', 'Emotions')}
</Text> </Text>
<CTAButton <Button
label={t('events.tasks.addEmotion', 'Add emotion')} size="$2"
fullWidth={false} backgroundColor={withAlpha(primary, 0.12)}
borderWidth={1}
borderColor={withAlpha(primary, 0.35)}
onPress={() => { onPress={() => {
setEditingEmotion(null); setEditingEmotion(null);
setEmotionForm({ name: '', color: border }); setEmotionForm({ name: '', color: border });
setShowEmotionSheet(true); setShowEmotionSheet(true);
}} }}
/> >
<Text fontSize="$xs" fontWeight="700" color={primary}>
{t('events.tasks.addEmotion', 'Add emotion')}
</Text>
</Button>
</XStack> </XStack>
{emotions.length === 0 ? ( {emotions.length === 0 ? (
<Text fontSize={12} fontWeight="500" color={muted}> <Text fontSize={12} fontWeight="500" color={muted}>
@@ -1182,17 +1191,12 @@ export default function MobileEventTasksPage() {
<Tabs.Content value="assigned" paddingTop="$2"> <Tabs.Content value="assigned" paddingTop="$2">
<Card borderRadius={18} borderWidth={1} borderColor={border} backgroundColor={surface} padding="$3"> <Card borderRadius={18} borderWidth={1} borderColor={border} backgroundColor={surface} padding="$3">
<YStack space="$2"> <YStack space="$2">
<YStack className="admin-sticky-toolbar">
<Card <Card
borderRadius={16} borderRadius={16}
borderWidth={1} borderWidth={1}
borderColor={stickyBorder} borderColor={border}
backgroundColor={stickySurface} backgroundColor={surfaceMuted}
padding="$2.5" padding="$2.5"
shadowColor={stickyShadow}
shadowOpacity={0.12}
shadowRadius={12}
shadowOffset={{ width: 0, height: 8 }}
> >
<XStack alignItems="center" space="$2"> <XStack alignItems="center" space="$2">
<XStack flex={1}> <XStack flex={1}>
@@ -1228,7 +1232,6 @@ export default function MobileEventTasksPage() {
</Pressable> </Pressable>
</XStack> </XStack>
</Card> </Card>
</YStack>
{taskPanel} {taskPanel}
</YStack> </YStack>
</Card> </Card>