Skip to content
This repository was archived by the owner on Aug 30, 2025. It is now read-only.

Commit d001cf4

Browse files
committed
feat(Homeworks): ajout d'une nouvelle icône et réorganisation des boutons pour une meilleure accessibilité
1 parent 2eb1eda commit d001cf4

File tree

1 file changed

+60
-33
lines changed

1 file changed

+60
-33
lines changed

src/views/account/Homeworks/Homeworks.tsx

Lines changed: 60 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,12 @@ import { dateToEpochWeekNumber, epochWNToDate } from "@/utils/epochWeekNumber";
2020
import * as StoreReview from "expo-store-review";
2121

2222
import { PressableScale } from "react-native-pressable-scale";
23-
import { CheckSquare, Plus } from "lucide-react-native";
23+
import { CheckSquare, Plus, WandSparkles } from "lucide-react-native";
2424
import { useSafeAreaInsets } from "react-native-safe-area-context";
2525
import { BlurView } from "expo-blur";
2626

2727
import Reanimated, {
2828
FadeIn,
29-
FadeInLeft,
3029
FadeInUp,
3130
FadeOutDown,
3231
FadeOutLeft,
@@ -407,39 +406,67 @@ const WeekView: Screen<"Homeworks"> = ({ route, navigation }) => {
407406
}}
408407
/>
409408

410-
<Reanimated.View
411-
layout={animPapillon(LinearTransition)}
412-
entering={animPapillon(FadeInLeft).delay(100)}
413-
exiting={animPapillon(FadeOutLeft)}
414-
style={{
415-
alignItems: "center",
416-
justifyContent: "center",
417-
backgroundColor: hideDone ? theme.colors.primary : theme.colors.background + "ff",
418-
borderColor: theme.colors.border + "dd",
419-
borderWidth: 1,
420-
borderRadius: 800,
421-
height: 40,
422-
width: 40,
423-
gap: 4,
424-
shadowColor: "#00000022",
425-
shadowOffset: { width: 0, height: 2 },
426-
shadowOpacity: 0.6,
427-
shadowRadius: 4,
428-
}}
429-
>
430-
<TouchableOpacity
431-
onPress={() => {
432-
setHideDone(!hideDone);
409+
<View style={{ flexDirection: "row", gap: 10 }}>
410+
<View
411+
style={{
412+
alignItems: "center",
413+
justifyContent: "center",
414+
backgroundColor: hideDone ? theme.colors.primary : theme.colors.background + "ff",
415+
borderColor: theme.colors.border + "dd",
416+
borderWidth: 1,
417+
borderRadius: 800,
418+
height: 40,
419+
width: 40,
420+
gap: 4,
421+
shadowColor: "#00000022",
422+
shadowOffset: { width: 0, height: 2 },
423+
shadowOpacity: 0.6,
424+
shadowRadius: 4,
433425
}}
434426
>
435-
<CheckSquare
436-
size={20}
437-
color={hideDone ? "#fff" : theme.colors.text}
438-
strokeWidth={2.5}
439-
opacity={hideDone ? 1 : 0.7}
440-
/>
441-
</TouchableOpacity>
442-
</Reanimated.View>
427+
<TouchableOpacity
428+
onPress={() => {
429+
setHideDone(!hideDone);
430+
}}
431+
>
432+
<CheckSquare
433+
size={20}
434+
color={hideDone ? "#fff" : theme.colors.text}
435+
strokeWidth={2.5}
436+
opacity={hideDone ? 1 : 0.7}
437+
/>
438+
</TouchableOpacity>
439+
</View>
440+
441+
<View
442+
style={{
443+
alignItems: "center",
444+
justifyContent: "center",
445+
backgroundColor: theme.colors.primary,
446+
borderColor: theme.colors.border + "dd",
447+
borderWidth: 1,
448+
borderRadius: 800,
449+
height: 40,
450+
width: 40,
451+
gap: 4,
452+
shadowColor: "#00000022",
453+
shadowOffset: { width: 0, height: 2 },
454+
shadowOpacity: 0.6,
455+
shadowRadius: 4,
456+
}}
457+
>
458+
<TouchableOpacity
459+
onPress={() => navigation.navigate("SettingStack", { screen: "SettingsMagic" })}
460+
>
461+
<WandSparkles
462+
size={20}
463+
color={theme.colors.text}
464+
strokeWidth={2.5}
465+
opacity={1}
466+
/>
467+
</TouchableOpacity>
468+
</View>
469+
</View>
443470
</PapillonModernHeader>
444471

445472
<AddHomeworkButton

0 commit comments

Comments
 (0)