Skip to content
This repository has been archived by the owner on Aug 25, 2024. It is now read-only.

Commit

Permalink
Merge branch 'development' into ui/separators
Browse files Browse the repository at this point in the history
  • Loading branch information
ecnivtwelve authored Apr 1, 2024
2 parents 48d428c + 9545217 commit 6d4d606
Show file tree
Hide file tree
Showing 14 changed files with 1,153 additions and 195 deletions.
6 changes: 6 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@
}
},
"plugins": [
[
"expo-document-picker",
{
"iCloudContainerEnvironment": "Production"
}
],
[
"expo-notifications",
{
Expand Down
5 changes: 5 additions & 0 deletions fetch/PronoteData/homework.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { AsyncStoragePronoteKeys } from './connector';
import { getDefaultStore } from 'jotai';
import { homeworksAtom } from '../../atoms/homeworks';
import { btoa } from 'js-base64';
import { RegisterTrophy } from '../../views/Settings/TrophiesScreen';

const defaultStore = getDefaultStore();

Expand Down Expand Up @@ -168,5 +169,9 @@ export const homeworkPatchHandler = async (homework: PapillonHomework, newDoneSt
homeworks[homeworkIndex].done = newDoneState;
defaultStore.set(homeworksAtom, homeworks);

if(newDoneState) {
RegisterTrophy('trophy_hw_done', homeworkID);
}

return true;
};
375 changes: 186 additions & 189 deletions ios/Papillon.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ PODS:
- ExpoModulesCore
- ExpoDevice (5.4.0):
- ExpoModulesCore
- ExpoDocumentPicker (11.5.4):
- ExpoModulesCore
- ExpoDynamicAppIcon (1.2.0):
- ExpoModulesCore
- ExpoHaptics (12.4.0):
Expand Down Expand Up @@ -463,6 +465,8 @@ PODS:
- ReactCommon/turbomodule/core
- react-native-sfsymbols (1.2.1):
- React
- react-native-view-shot (3.8.0):
- React-Core
- react-native-webview (13.8.1):
- RCT-Folly (= 2021.07.22.00)
- React-Core
Expand Down Expand Up @@ -630,6 +634,8 @@ PODS:
- RNScreens (3.22.1):
- React-Core
- React-RCTImage
- RNShare (10.1.0):
- React-Core
- RNSVG (13.9.0):
- React-Core
- SocketRocket (0.6.1)
Expand Down Expand Up @@ -667,6 +673,7 @@ DEPENDENCIES:
- ExpoClipboard (from `../node_modules/expo-clipboard/ios`)
- ExpoCrypto (from `../node_modules/expo-crypto/ios`)
- ExpoDevice (from `../node_modules/expo-device/ios`)
- ExpoDocumentPicker (from `../node_modules/expo-document-picker/ios`)
- ExpoDynamicAppIcon (from `../node_modules/expo-dynamic-app-icon/ios`)
- ExpoHaptics (from `../node_modules/expo-haptics/ios`)
- ExpoImagePicker (from `../node_modules/expo-image-picker/ios`)
Expand Down Expand Up @@ -708,6 +715,7 @@ DEPENDENCIES:
- react-native-render-html (from `../node_modules/react-native-render-html`)
- react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
- react-native-sfsymbols (from `../node_modules/react-native-sfsymbols`)
- react-native-view-shot (from `../node_modules/react-native-view-shot`)
- react-native-webview (from `../node_modules/react-native-webview`)
- React-NativeModulesApple (from `../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`)
- React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`)
Expand Down Expand Up @@ -737,6 +745,7 @@ DEPENDENCIES:
- RNReactNativeSharedGroupPreferences (from `../node_modules/react-native-shared-group-preferences`)
- RNReanimated (from `../node_modules/react-native-reanimated`)
- RNScreens (from `../node_modules/react-native-screens`)
- RNShare (from `../node_modules/react-native-share`)
- RNSVG (from `../node_modules/react-native-svg`)
- UMAppLoader (from `../node_modules/unimodules-app-loader/ios`)
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)
Expand Down Expand Up @@ -799,6 +808,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/expo-crypto/ios"
ExpoDevice:
:path: "../node_modules/expo-device/ios"
ExpoDocumentPicker:
:path: "../node_modules/expo-document-picker/ios"
ExpoDynamicAppIcon:
:path: "../node_modules/expo-dynamic-app-icon/ios"
ExpoHaptics:
Expand Down Expand Up @@ -878,6 +889,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native-safe-area-context"
react-native-sfsymbols:
:path: "../node_modules/react-native-sfsymbols"
react-native-view-shot:
:path: "../node_modules/react-native-view-shot"
react-native-webview:
:path: "../node_modules/react-native-webview"
React-NativeModulesApple:
Expand Down Expand Up @@ -936,6 +949,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native-reanimated"
RNScreens:
:path: "../node_modules/react-native-screens"
RNShare:
:path: "../node_modules/react-native-share"
RNSVG:
:path: "../node_modules/react-native-svg"
UMAppLoader:
Expand Down Expand Up @@ -969,6 +984,7 @@ SPEC CHECKSUMS:
ExpoClipboard: 695f274f8e028cd113837f917da40c76850877eb
ExpoCrypto: a382ab9a2fa91f0b511ce1fe4d6baecee40a1615
ExpoDevice: 1c1b0c9cad96c292c1de73948649cfd654b2b3c0
ExpoDocumentPicker: 5cb7389ff935b4addefdd466a606de51a512e922
ExpoDynamicAppIcon: b0f96e53d0bf00412bbe97da0cfc15b8c94a54ce
ExpoHaptics: 360af6898407ee4e8265d30a1a8fb16491a660eb
ExpoImagePicker: c58fdf28be551681a8edc550bcec76c397a8dfcd
Expand Down Expand Up @@ -1010,6 +1026,7 @@ SPEC CHECKSUMS:
react-native-render-html: 984dfe2294163d04bf5fe25d7c9f122e60e05ebe
react-native-safe-area-context: 36cc67648134e89465663b8172336a19eeda493d
react-native-sfsymbols: bd3a0d3eab185e80b571bae60753dcf5a0d57967
react-native-view-shot: 6b7ed61d77d88580fed10954d45fad0eb2d47688
react-native-webview: bdc091de8cf7f8397653e30182efcd9f772e03b3
React-NativeModulesApple: 02e35e9a51e10c6422f04f5e4076a7c02243fff2
React-perflogger: e3596db7e753f51766bceadc061936ef1472edc3
Expand Down Expand Up @@ -1039,6 +1056,7 @@ SPEC CHECKSUMS:
RNReactNativeSharedGroupPreferences: 29092869fc2e40d5baca5e15d82fa5c24a668977
RNReanimated: 726395a2fa2f04cea340274ba57a4e659bc0d9c1
RNScreens: 50ffe2fa2342eabb2d0afbe19f7c1af286bc7fb3
RNShare: b674d9f1cb0dc11116983bebd8712908a226a3ee
RNSVG: 53c661b76829783cdaf9b7a57258f3d3b4c28315
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
UMAppLoader: e83f024f75f07802fce99739f04b4537d188caaf
Expand Down
75 changes: 75 additions & 0 deletions package-lock.json

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

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,19 +96,22 @@
"react-native-screens": "~3.22.0",
"react-native-segmented-control-2": "^1.1.0",
"react-native-sfsymbols": "^1.2.1",
"react-native-share": "^10.1.0",
"react-native-shared-group-preferences": "^1.1.24",
"react-native-simple-line-chart": "^0.32.0",
"react-native-smooth-pincode-input": "^1.0.9",
"react-native-svg": "13.9.0",
"react-native-swiper": "^1.6.0-rc.3",
"react-native-tableview-simple": "^4.4.0",
"react-native-url-polyfill": "^2.0.0",
"react-native-view-shot": "^3.8.0",
"react-native-webview": "^13.8.1",
"react-native-wheel-scrollview-picker": "^2.0.4",
"reanimated-color-picker": "^2.3.4",
"scolengo-api": "^3.0.2",
"sync-storage": "^0.4.2",
"typescript": "^5.1.3"
"typescript": "^5.1.3",
"expo-document-picker": "~11.5.4"
},
"devDependencies": {
"@babel/core": "^7.23.2",
Expand Down
9 changes: 9 additions & 0 deletions stacks/SettingsStack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import HeaderSelectScreen from '../views/Settings/HeaderSelectScreen';
import PaymentScreen from '../views/Settings/PaymentScreen';
import NotificationsScreen from '../views/Settings/NotificationsScreen';
import ConsentScreenWithoutAcceptation from '../views/ConsentScreenWithoutAcceptation';
import TrophiesScreen from '../views/Settings/TrophiesScreen';

function InsetSettings() {
const UIColors = GetUIColors();
Expand Down Expand Up @@ -117,6 +118,14 @@ function InsetSettings() {
headerTitle: 'Notifications',
}}
/>
<Stack.Screen
name="TrophiesScreen"
component={TrophiesScreen}
options={{
headerTitle: 'Trophées',
headerTintColor: '#ffffff',
}}
/>
<Stack.Screen
name="ConsentScreenWithoutAcceptation"
component={ConsentScreenWithoutAcceptation}
Expand Down
4 changes: 4 additions & 0 deletions views/Devoirs/CreateHomeworkScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import AlertBottomSheet from '../../interface/AlertBottomSheet';
import { AlertTriangle } from 'lucide-react-native';

import { useSafeAreaInsets } from 'react-native-safe-area-context';
import { RegisterTrophy } from '../Settings/TrophiesScreen';

const CreateHomeworkScreen = ({ route, navigation }) => {
const UIColors = GetUIColors();
Expand Down Expand Up @@ -155,6 +156,9 @@ const CreateHomeworkScreen = ({ route, navigation }) => {
AsyncStorage.setItem('pap_homeworksCustom', JSON.stringify(hw)).then(() => {
console.log('Homework added');
console.log(hw);

RegisterTrophy('trophy_add_hw');

navigation.goBack();
});
});
Expand Down
6 changes: 6 additions & 0 deletions views/Grades/GradeView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ import {
X,
} from 'lucide-react-native';

import { RegisterTrophy } from '../Settings/TrophiesScreen';

import { useLayoutEffect } from 'react';
import { getSavedCourseColor } from '../../utils/ColorCoursName';

Expand Down Expand Up @@ -58,6 +60,10 @@ function GradeView({ route, navigation }) {
});
};

useEffect(() => {
RegisterTrophy('trophy_grades_view');
}, []);

const [modalLoading, setModalLoading] = useState(false);
const [modalLoadingText, setModalLoadingText] = useState('');

Expand Down
3 changes: 3 additions & 0 deletions views/HomeScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ const openURL = (url: string) => {

import Carousel from 'react-native-reanimated-carousel';
import TimeSeparator from '../interface/CoursScreen/TimeSeparator';
import { RegisterTrophy } from './Settings/TrophiesScreen';

// create list of dict from THEMES_IMAGES
const THEMES_IMAGES_LIST = [
Expand Down Expand Up @@ -1181,6 +1182,7 @@ function HomeScreen({ navigation }: { navigation: any }) {
scrollAnimationDuration={100}
onSnapToItem={(index) => {
setCurrentThemeIndex(index);
RegisterTrophy('trophy_bandeau', new Date().getDate());
Haptics.impactAsync(
Haptics.ImpactFeedbackStyle.Light
);
Expand Down Expand Up @@ -1297,6 +1299,7 @@ function HomeScreen({ navigation }: { navigation: any }) {
scrollAnimationDuration={100}
onSnapToItem={(index) => {
setCurrentThemeIndex(index);
RegisterTrophy('trophy_bandeau', new Date().getDate());
Haptics.impactAsync(
Haptics.ImpactFeedbackStyle.Light
);
Expand Down
Loading

0 comments on commit 6d4d606

Please sign in to comment.