Skip to content

Commit

Permalink
Merge branch 'main' into fix/detectExpo
Browse files Browse the repository at this point in the history
  • Loading branch information
Kgeek33 committed Feb 6, 2025
2 parents c6ce75c + 74ae48a commit f1ee148
Show file tree
Hide file tree
Showing 33 changed files with 890 additions and 211 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ android {
applicationId 'xyz.getpapillon.app'
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 7820
versionName "7.8.2"
versionCode 7830
versionName "7.8.3"
}
signingConfigs {
debug {
Expand Down
Binary file added assets/images/mask_stripes_large.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/mask_stripes_long.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/mask_stripes_long_white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/mask_stripes_repeat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/mask_stripes_texture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 9 additions & 33 deletions ios/Papillon/Images.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,14 @@
{
"images" : [
"images": [
{
"filename" : "Icon-Light-1024x1024.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"filename" : "Icon-Dark-1024x1024.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "tinted"
}
],
"filename" : "Icon-Tinted-1024x1024.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
"filename": "App-Icon-1024x1024@1x.png",
"idiom": "universal",
"platform": "ios",
"size": "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
"info": {
"version": 1,
"author": "expo"
}
}
}
2 changes: 1 addition & 1 deletion ios/Papillon/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>7.8.2</string>
<string>7.8.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand Down
57 changes: 53 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "papillonvex",
"version": "7.8.2",
"version": "7.8.3",
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
Expand All @@ -12,6 +12,7 @@
"dependencies": {
"@birdwingo/react-native-reanimated-graph": "^1.1.3",
"@candlefinance/app-icon": "^0.4.5",
"@howljs/calendar-kit": "^2.2.1",
"@notifee/react-native": "^7.8.2",
"@react-native-async-storage/async-storage": "1.23.1",
"@react-native-community/datetimepicker": "8.0.1",
Expand Down Expand Up @@ -70,6 +71,7 @@
"lodash": "^4.17.21",
"lottie-react-native": "^6.7.0",
"lucide-react-native": "^0.378.0",
"notifee": "^0.0.1",
"openid-client": "^5.7.0",
"pawdirecte": "^1.7.1",
"pawnilim": "^0.2.0",
Expand Down
13 changes: 9 additions & 4 deletions src/background/Notifications.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
import { alertExpoGo, isExpoGo } from "@/utils/native/expoGoAlert";
import { Notification } from "@notifee/react-native";

const requestNotificationPermission = () => {
return async () => {
const requestNotificationPermission = async () => {
try {
if (!isExpoGo()) {
console.log("Requesting notification permission...");
const notifee = (await import("@notifee/react-native")).default;
await notifee.requestPermission();
return notifee.requestPermission();
} else {
alertExpoGo();
return false;
}
};
}
catch (error) {
console.error("Error requesting notification permission:", error);
return false;
}
};

const papillonNotify = async (props: Notification) => {
Expand Down
41 changes: 41 additions & 0 deletions src/components/Drawables/DrawableImportRestaurant.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import * as React from "react";
import Svg, { Rect, Path } from "react-native-svg";

const DrawableImportRestaurant = (props: any) => (
<Svg
xmlns="http://www.w3.org/2000/svg"
width={148}
height={118}
fill="none"
{...props}
>
<Rect
width={70}
height={52}
x={71.704}
y={64.927}
stroke={props.color || "#000"}
strokeWidth={4}
rx={10}
transform="rotate(-4.826 71.704 64.927)"
/>
<Path
fill={props.color || "#000"}
d="m74.494 92.658 69.752-5.89 1.178 13.95-69.752 5.89zM132.952 76.327l-7.024 5.794c-1.244 1.027-3.13.233-3.265-1.375l-.873-10.329c-.135-1.607 1.59-2.706 2.989-1.902l7.896 4.534a2 2 0 0 1 .277 3.278"
/>
<Path
stroke={props.color || "#000"}
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={4}
d="M102.464 48.49s4.435-15.648-12-20c-16.435-4.35-27.5 18.593-16 22S93.793 10.128 72.83 7.628c-20.962-2.5-28.537 26.5-28.537 26.5m0 0-5.5-13.5m5.5 13.5 13.5-8"
/>
<Path
stroke={props.color || "#000"}
strokeWidth={4}
d="M38.283 67.784c-1.074 2.712-9.085 6.73-18.463 6.057-9.976-.718-17.83-4.817-17.544-9.156.224-3.393 5.36-5.928 12.36-6.529m23.647 9.628.12-.501m-.12.501c-2.268 9.696-2.13 19.306.56 19.99 2.736.695 6.893-6.737 9.285-16.6 2.392-9.862 2.113-18.42-.622-19.117-2.676-.68-6.535 5.096-8.941 14.572m-.282 1.155q.103-.26.12-.501m-23.767-9.127a32.5 32.5 0 0 0 4.028 4.79c7.212 7.069 16.775 7.464 19.738 4.337m-23.766-9.127C10.5 52.139 9.25 45.834 11.576 43.38c2.964-3.127 11.212.068 18.424 7.137 6.497 6.368 8.789 13.586 8.565 16.112m-23.93-8.473a40 40 0 0 1 6.223-.029c9.976.718 17.83 4.817 17.544 9.156m0 0q.08-.33.163-.654m-.163.654q.126-.237.163-.654"
/>
</Svg>
);

export default DrawableImportRestaurant;
14 changes: 11 additions & 3 deletions src/components/Global/MissingItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import AnimatedEmoji from "../Grades/AnimatedEmoji";
interface MissingItemProps {
style?: StyleProp<AnimatedStyle<StyleProp<ViewStyle>>>;
emoji?: string;
leading?: React.ReactNode;
trailing?: React.ReactNode;
animatedEmoji?: boolean;
title: string;
description: string;
Expand All @@ -15,6 +17,8 @@ interface MissingItemProps {

const MissingItem: React.FC<MissingItemProps> = ({
style,
leading,
trailing,
emoji,
animatedEmoji,
title,
Expand All @@ -28,13 +32,15 @@ const MissingItem: React.FC<MissingItemProps> = ({
style={[{
justifyContent: "center",
alignItems: "center",
gap: 4,
paddingHorizontal: 40,
gap: 8,
paddingHorizontal: 20,
}, style]}
entering={entering ? entering : FadeInUp}
exiting={exiting ? exiting : FadeOutDown}
>
{!animatedEmoji ? (
{leading && leading}

{!animatedEmoji ? emoji && (
<Text style={{ fontSize: 32 }}>
{emoji}
</Text>
Expand All @@ -49,6 +55,8 @@ const MissingItem: React.FC<MissingItemProps> = ({
<NativeText variant="subtitle" style={{textAlign: "center"}}>
{description}
</NativeText>

{trailing && trailing}
</Reanimated.View>
);
};
Expand Down
6 changes: 4 additions & 2 deletions src/components/Home/AccountSwitcherContextMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,10 @@ const ContextMenu: React.FC<{
key={index}
onPress={() => {
Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Soft);
switchTo(account).then(() => {
setOpened(false);
setOpened(false);

requestAnimationFrame(() => {
switchTo(account);
});
}}
style={({ pressed }) => [
Expand Down
9 changes: 8 additions & 1 deletion src/consts/DefaultTabs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,12 @@ export const defaultTabs = [
description: "Tes compétences et évaluations",
icon: require("@/../assets/lottie/tab_evaluations.json"),
enabled: true,
}
},
{
tab: "Week",
label: "Semaine",
description: "Vue avancée de la semaine",
icon: require("@/../assets/lottie/tab_calendar.json"),
enabled: true,
},
] as const;
1 change: 1 addition & 0 deletions src/router/helpers/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export type RouteParameters = {
autoAdd?: boolean;
};
LessonDocument: { lesson: Homework };
Week: { outsideNav?: boolean };

Homeworks?: { outsideNav?: boolean };
HomeworksDocument: { homework: Homework };
Expand Down
7 changes: 7 additions & 0 deletions src/router/screens/account/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import createScreen from "@/router/helpers/create-screen";
import Lessons from "@/views/account/Lessons/Lessons";
import Week from "@/views/account/Week/Week";
import Homeworks from "@/views/account/Homeworks/Homeworks";
import HomeStackScreen from "./home";
import Menu from "@/views/account/Restaurant/Menu";
Expand All @@ -21,6 +22,12 @@ export const screens = [
tabBarLabel: "Cours",
tabBarLottie: require("@/../assets/lottie/tab_calendar.json"),
}),
createScreen("Week", Week, {
headerTitle: "Semaine",
headerShown: false,
tabBarLabel: "Semaine",
tabBarLottie: require("@/../assets/lottie/tab_calendar.json"),
}),
createScreen("Homeworks", Homeworks, {
headerTitle: "Devoirs",
headerShown: false,
Expand Down
Loading

0 comments on commit f1ee148

Please sign in to comment.