Skip to content

Commit

Permalink
Merge branch 'PapillonApp:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel29306 authored Dec 29, 2024
2 parents 835c2c0 + f08d9d1 commit 7b428b5
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 45 deletions.
62 changes: 45 additions & 17 deletions src/views/account/Home/ModalContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Reanimated, {
FlipInXDown,
LinearTransition,
} from "react-native-reanimated";
import {Gift, Sparkle, Sparkles, WifiOff} from "lucide-react-native";
import {Gift, Sparkle, Sparkles, WifiOff, X} from "lucide-react-native";
import {useTheme} from "@react-navigation/native";
import PackageJSON from "../../../../package.json";
import {Dimensions, View} from "react-native";
Expand All @@ -22,6 +22,7 @@ import AsyncStorage from "@react-native-async-storage/async-storage";
import {defaultTabs} from "@/consts/DefaultTabs";
import {NativeStackNavigationProp} from "@react-navigation/native-stack";
import {RouteParameters} from "@/router/helpers/types";
import { TouchableOpacity } from "react-native-gesture-handler";

interface ModalContentProps {
navigation: NativeStackNavigationProp<RouteParameters, "HomeScreen", undefined>
Expand Down Expand Up @@ -151,29 +152,56 @@ const ModalContent: React.FC<ModalContentProps> = ({ navigation, refresh, endRef
entering={animPapillon(FadeInUp)}
exiting={animPapillon(FadeOutDown)}
>
<NativeItem
leading={
<Sparkles
color={colors.primary}
size={28}
strokeWidth={2}
/>
}
<TouchableOpacity
onPress={() => navigation.navigate("ChangelogScreen")}
style={{
backgroundColor: colors.primary + "30",
}}
androidStyle={{
flex: 1,
flexDirection: "column",
backgroundColor: colors.card,
paddingHorizontal: 14,
paddingVertical: 12,
gap: 8,
backgroundColor: colors.primary + "20",
}}
>
<NativeText variant="title">
Découvrez les nouveautés de Papillon {PackageJSON.version}
</NativeText>
<View
style={{
flexDirection: "row",
alignItems: "center",
gap: 8,
}}
>
<Sparkles
size={22}
strokeWidth={2}
color={colors.text}
/>
<NativeText variant="title" style={{ flex: 1}}>
Papillon vient d'être mis à jour à la version {PackageJSON.version} !
</NativeText>

<TouchableOpacity
onPress={() => {
AsyncStorage.setItem("changelog.lastUpdate", PackageJSON.version);
setUpdatedRecently(false);
}}
style={{
padding: 4,
borderRadius: 100,
backgroundColor: colors.text + "20",
}}
>
<X
size={18}
strokeWidth={3}
color={colors.text}
/>
</TouchableOpacity>
</View>
<NativeText variant="subtitle">
Ouvrir les notes de mise à jour de cette version de Papillon
Cliquez ici pour voir tous les changements et les dernières nouveautés.
</NativeText>
</NativeItem>
</TouchableOpacity>
</NativeList>
)}

Expand Down
31 changes: 3 additions & 28 deletions src/views/login/pronote/PronoteInstanceSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -298,34 +298,9 @@ const PronoteInstanceSelector: Screen<"PronoteInstanceSelector"> = ({
showAlert
);
}}
>
<View>
<Text
style={{
fontSize: 18,
fontFamily: "medium",
width: "100%",
color: colors.text + "88"
}}
numberOfLines={1}
ellipsizeMode="tail"
>
{instance.name}
</Text>
<Text
style={{
fontSize: 15,
fontFamily: "medium",
width: "100%",
color: colors.text + "55",
}}
numberOfLines={1}
ellipsizeMode="tail"
>
{${instance.distance.toFixed(2)}km de toi`}
</Text>
</View>
</DuoListPressable>
text={instance.name}
subtext={${instance.distance.toFixed(2)}km de toi`}
/>
</Reanimated.View>
))}
</Reanimated.View>
Expand Down

0 comments on commit 7b428b5

Please sign in to comment.