From bc65172e3e218885371acccf0bb8645d900da6c9 Mon Sep 17 00:00:00 2001 From: NoLoSay Date: Sat, 17 Aug 2024 13:00:24 +0000 Subject: [PATCH] Update from https://github.com/NoLoSay/NoLoApp/commit/62aa8ae7f51238510b73c80aa971b2f22a6088bc --- assets/icons/full/eye.png.html | Bin 5110 -> 5110 bytes assets/icons/full/index.html | 2 +- assets/icons/full/shield.png.html | Bin 4686 -> 4686 bytes assets/icons/full/user.png.html | Bin 4559 -> 4559 bytes assets/icons/full/username.png.html | Bin 5828 -> 5828 bytes assets/icons/maps/index.html | 2 +- assets/icons/maps/map_pin.png.html | 2 +- assets/icons/outline/CGU.png.html | Bin 5254 -> 5254 bytes assets/icons/outline/back_arrow.png.html | Bin 4208 -> 4208 bytes assets/icons/outline/camera.png.html | Bin 5179 -> 0 bytes assets/icons/outline/index.html | 36 +- assets/icons/outline/library.png.html | Bin 5125 -> 0 bytes assets/icons/outline/magnifier.png.html | Bin 7185 -> 7185 bytes assets/icons/outline/map_arrow.png.html | Bin 7959 -> 7959 bytes assets/icons/outline/menu.png.html | Bin 6971 -> 6971 bytes assets/icons/outline/trash.png.html | Bin 5101 -> 5101 bytes assets/icons/social/apple.png.html | 2 +- assets/icons/social/facebook.png.html | 2 +- assets/icons/social/google.png.html | Bin 15650 -> 15650 bytes assets/icons/social/index.html | 2 +- assets/icons/twoTones/bell.png.html | Bin 5778 -> 5778 bytes assets/icons/twoTones/heart.png.html | Bin 6022 -> 6022 bytes assets/icons/twoTones/index.html | 2 +- assets/icons/twoTones/lock.png.html | Bin 5623 -> 5623 bytes assets/icons/twoTones/logout.png.html | Bin 5706 -> 5706 bytes assets/icons/twoTones/profile.png.html | Bin 5961 -> 5961 bytes assets/images/logos/index.html | 2 +- assets/images/logos/nolosay.png.html | 2 +- index.html | 86 ++-- src/components/Button.tsx.html | 2 +- src/components/ImageLoader.tsx.html | 2 +- src/components/LoadingModal.tsx.html | 2 +- src/components/SocialIcon.tsx.html | 2 +- src/components/index.html | 2 +- src/global/colors.ts.html | 10 +- src/global/contexts/AccountProvider.tsx.html | 8 +- src/global/contexts/index.html | 2 +- src/global/images.ts.html | 50 +- src/global/index.html | 32 +- src/global/types/Account.ts.html | 4 +- src/global/types/AddContentCategory.ts.html | 133 ------ src/global/types/Places.ts.html | 2 +- src/global/types/index.html | 17 +- src/helpers/httpClient/common.ts.html | 2 +- src/helpers/httpClient/index.html | 2 +- src/helpers/httpClient/localization.ts.html | 2 +- src/helpers/httpClient/places.ts.html | 2 +- .../httpClient/queries/auth/auth.ts.html | 2 +- .../httpClient/queries/auth/index.html | 2 +- .../queries/auth/useConnect.ts.html | 2 +- .../queries/auth/useRegister.ts.html | 2 +- .../httpClient/queries/places/index.html | 2 +- .../queries/places/useNoloPlaces.ts.html | 2 +- .../ActionsScreen/ActionsScreen.tsx.html | 331 -------------- .../Views/ContentCategory.tsx.html | 427 ------------------ .../addSection/ActionsScreen/Views/index.html | 116 ----- .../addSection/ActionsScreen/index.html | 131 ------ .../useActionsScreenController.ts.html | 385 ---------------- .../connection/ConnectionScreen.tsx.html | 2 +- .../connection/Views/HeaderTexts.tsx.html | 2 +- .../connection/Views/index.html | 2 +- .../connection/index.html | 2 +- .../useConnectionController.ts.html | 2 +- .../sharedViews/ButtonChangeScreen.tsx.html | 2 +- .../sharedViews/LineSeparator.tsx.html | 2 +- .../sharedViews/OrSeparator.tsx.html | 2 +- .../sharedViews/SocialButtons.tsx.html | 2 +- .../sharedViews/TextInput.tsx.html | 2 +- .../sharedViews/index.html | 2 +- .../subscription/SubscriptionScreen.tsx.html | 2 +- .../subscription/Views/HeaderTexts.tsx.html | 2 +- .../subscription/Views/index.html | 2 +- .../subscription/index.html | 2 +- .../useSubscriptionController.ts.html | 2 +- .../home/CarouselView/CarouselView.tsx.html | 2 +- .../home/CarouselView/Views/Category.tsx.html | 2 +- .../Views/CategorySeparator.tsx.html | 2 +- .../home/CarouselView/Views/index.html | 2 +- src/screens/home/CarouselView/index.html | 2 +- src/screens/home/HomeScreen.tsx.html | 21 +- src/screens/home/MapView/MapView.tsx.html | 2 +- src/screens/home/MapView/index.html | 2 +- .../MapView/useMapViewController.tsx.html | 2 +- src/screens/home/Views/HeaderView.tsx.html | 30 +- src/screens/home/Views/NoPlacesFound.tsx.html | 2 +- src/screens/home/Views/index.html | 2 +- src/screens/home/index.html | 34 +- .../home/useHomeScreenController.tsx.html | 44 +- .../SharedViews/TopBar.tsx.html | 2 +- .../settingsSection/SharedViews/index.html | 2 +- .../settingsScreen/SettingsScreen.tsx.html | 2 +- .../settingsScreen/Views/HelpModal.tsx.html | 2 +- .../settingsScreen/Views/MainInfos.tsx.html | 2 +- .../Views/SettingCategoryDisplay.tsx.html | 2 +- .../settingsScreen/Views/index.html | 2 +- .../settingsSection/settingsScreen/index.html | 2 +- 96 files changed, 243 insertions(+), 1772 deletions(-) delete mode 100644 assets/icons/outline/camera.png.html delete mode 100644 assets/icons/outline/library.png.html delete mode 100644 src/global/types/AddContentCategory.ts.html delete mode 100644 src/screens/addSection/ActionsScreen/ActionsScreen.tsx.html delete mode 100644 src/screens/addSection/ActionsScreen/Views/ContentCategory.tsx.html delete mode 100644 src/screens/addSection/ActionsScreen/Views/index.html delete mode 100644 src/screens/addSection/ActionsScreen/index.html delete mode 100644 src/screens/addSection/ActionsScreen/useActionsScreenController.ts.html diff --git a/assets/icons/full/eye.png.html b/assets/icons/full/eye.png.html index 9555250819753c97e2d5d28c79999640df941b0e..abce0af7a155d513500f409c6d8d92eeed682ffc 100644 GIT binary patch delta 43 zcmeyS{!M+u3?U&4T|@H_Lt`rg11lqAJp(hNsL73j!jm01xF)X>7TtVDNQw~vE4mEB delta 43 xcmeyS{!M+u3?U(NT?3;KLqjW5OCZuSGBk{u+$bnK*@1&=@+x7`&3A;P7y&Gj49x%l diff --git a/assets/icons/full/index.html b/assets/icons/full/index.html index 3283c0e..f3db4c6 100644 --- a/assets/icons/full/index.html +++ b/assets/icons/full/index.html @@ -146,7 +146,7 @@

All files assets/icons/full

- - - - - - \ No newline at end of file diff --git a/src/global/types/Places.ts.html b/src/global/types/Places.ts.html index c48f00a..0278851 100644 --- a/src/global/types/Places.ts.html +++ b/src/global/types/Places.ts.html @@ -313,7 +313,7 @@

All files / src/globa - - - - - - \ No newline at end of file diff --git a/src/screens/addSection/ActionsScreen/Views/ContentCategory.tsx.html b/src/screens/addSection/ActionsScreen/Views/ContentCategory.tsx.html deleted file mode 100644 index e4b067d..0000000 --- a/src/screens/addSection/ActionsScreen/Views/ContentCategory.tsx.html +++ /dev/null @@ -1,427 +0,0 @@ - - - - - - Code coverage report for src/screens/addSection/ActionsScreen/Views/ContentCategory.tsx - - - - - - - - - -
-
-

All files / src/screens/addSection/ActionsScreen/Views ContentCategory.tsx

-
- -
- 75% - Statements - 3/4 -
- - -
- 83.33% - Branches - 5/6 -
- - -
- 50% - Functions - 1/2 -
- - -
- 75% - Lines - 3/4 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63 -64 -65 -66 -67 -68 -69 -70 -71 -72 -73 -74 -75 -76 -77 -78 -79 -80 -81 -82 -83 -84 -85 -86 -87 -88 -89 -90 -91 -92 -93 -94 -95 -96 -97 -98 -99 -100 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -2x -  -2x -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -1x -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  - 
/**
- * @fileoverview Actions screen component
- * @module ActionsScreen
- * @description Actions screen, it is the first screen that a user sees when clicking on the + tab
- * @requires react react-native
- */
- 
-import React from 'react'
-import { Image, LayoutRectangle, Pressable, StyleSheet, Text, View } from 'react-native'
-import FastImage, { Source } from 'react-native-fast-image'
-import AddContentCategory from '@global/types/AddContentCategory'
-import { colors } from '@global/colors'
-import images from '@global/images'
- 
-/**
- * @typedef ContentCategoryProps
- * @property {AddContentCategory} contentCategory
- * @property {() => void} onPress
- */
-interface ContentCategoryProps {
-  contentCategory: AddContentCategory
-  onPress: () => void
-}
- 
-/**
- * @function ActionsScreen
- * @description Component that renders the Scan screen.
- * @param {ContentCategoryProps} props Component props
- * @returns {React.JSX.Element} App component template
- */
-export default function ContentCategory({ contentCategory, onPress }: ContentCategoryProps): React.JSX.Element {
-  const [iconContainerSize, setIconContainerSize] = React.useState<LayoutRectangle | undefined>()
- 
-  return (
-    <Pressable
-      style={styles.container}
-      onPress={onPress}
-    >
-      <View
-        style={styles.iconContainer}
-        onLayout={event => setIconContainerSize(event.nativeEvent.layout)}
-      >
-        <FastImage
-          source={contentCategory.icon() as unknown as Source}
-          style={{ width: (iconContainerSize?.width ?? 40) - 16, height: (iconContainerSize?.width ?? 40) - 16 }}
-        />
-      </View>
-      <View style={styles.textContainer}>
-        <Text style={styles.title}>{contentCategory.title}</Text>
-        {/* eslint-disable-next-line no-constant-binary-expression */}
-        {contentCategory.subtitle !== null ?? <Text style={styles.subtitle}>{contentCategory.subtitle}</Text>}
-      </View>
-      <Image
-        style={styles.arrowContainer}
-        source={images.icons.outline.backArrow()}
-      />
-    </Pressable>
-  )
-}
- 
-const styles = StyleSheet.create({
-  title: {
-    color: colors.black,
-    fontFamily: 'Poppins',
-    fontWeight: '500',
-    fontSize: 16,
-    textAlign: 'center',
-  },
-  subtitle: {
-    color: colors.dark,
-    fontFamily: 'Poppins',
-    fontWeight: '500',
-    fontSize: 12,
-    textAlign: 'center',
-  },
-  container: {
-    backgroundColor: colors.accent,
-    borderRadius: 8,
-    padding: 16,
-    marginHorizontal: 16,
-    marginVertical: 8,
-    shadowColor: colors.black,
-    shadowOpacity: 0.6,
-    shadowOffset: {
-      width: 0,
-      height: 2,
-    },
-    flexDirection: 'row',
-  },
-  iconContainer: {
-    height: 60,
-    alignSelf: 'center',
-    marginBottom: 8,
-    backgroundColor: colors.white,
-    borderRadius: 50,
-    flex: 2,
-    alignItems: 'center',
-    justifyContent: 'center',
-  },
-  textContainer: {
-    flexDirection: 'column',
-    flex: 8,
-    alignContent: 'center',
-    justifyContent: 'center',
-  },
-  arrowContainer: {
-    height: 20,
-    width: 10,
-    alignSelf: 'center',
-    tintColor: colors.darkGrey,
-    marginBottom: 8,
-    borderRadius: 50,
-  },
-})
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/src/screens/addSection/ActionsScreen/Views/index.html b/src/screens/addSection/ActionsScreen/Views/index.html deleted file mode 100644 index 3d7437d..0000000 --- a/src/screens/addSection/ActionsScreen/Views/index.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - Code coverage report for src/screens/addSection/ActionsScreen/Views - - - - - - - - - -
-
-

All files src/screens/addSection/ActionsScreen/Views

-
- -
- 75% - Statements - 3/4 -
- - -
- 83.33% - Branches - 5/6 -
- - -
- 50% - Functions - 1/2 -
- - -
- 75% - Lines - 3/4 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FileStatementsBranchesFunctionsLines
ContentCategory.tsx -
-
75%3/483.33%5/650%1/275%3/4
-
-
-
- - - - - - - - \ No newline at end of file diff --git a/src/screens/addSection/ActionsScreen/index.html b/src/screens/addSection/ActionsScreen/index.html deleted file mode 100644 index 49d288e..0000000 --- a/src/screens/addSection/ActionsScreen/index.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - Code coverage report for src/screens/addSection/ActionsScreen - - - - - - - - - -
-
-

All files src/screens/addSection/ActionsScreen

-
- -
- 40% - Statements - 10/25 -
- - -
- 40% - Branches - 4/10 -
- - -
- 57.14% - Functions - 4/7 -
- - -
- 40% - Lines - 10/25 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FileStatementsBranchesFunctionsLines
ActionsScreen.tsx -
-
83.33%5/6100%2/266.66%2/383.33%5/6
useActionsScreenController.ts -
-
26.31%5/1925%2/850%2/426.31%5/19
-
-
-
- - - - - - - - \ No newline at end of file diff --git a/src/screens/addSection/ActionsScreen/useActionsScreenController.ts.html b/src/screens/addSection/ActionsScreen/useActionsScreenController.ts.html deleted file mode 100644 index c86724d..0000000 --- a/src/screens/addSection/ActionsScreen/useActionsScreenController.ts.html +++ /dev/null @@ -1,385 +0,0 @@ - - - - - - Code coverage report for src/screens/addSection/ActionsScreen/useActionsScreenController.ts - - - - - - - - - -
-
-

All files / src/screens/addSection/ActionsScreen useActionsScreenController.ts

-
- -
- 26.31% - Statements - 5/19 -
- - -
- 25% - Branches - 2/8 -
- - -
- 50% - Functions - 2/4 -
- - -
- 26.31% - Lines - 5/19 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63 -64 -65 -66 -67 -68 -69 -70 -71 -72 -73 -74 -75 -76 -77 -78 -79 -80 -81 -82 -83 -84 -85 -86 -87 -88 -89 -90 -91 -92 -93 -94 -95 -96 -97 -98 -99 -100 -101  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -1x -1x -  -  -  -  -  -  -  -1x -  -3x -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -1x -  -  -  -  -  - 
import { useCallback, useContext } from 'react'
-import { useNavigation } from '@react-navigation/native'
-import { ContentCategoryId } from '@global/types/AddContentCategory'
-import { AccountElevationEnum, AccountType } from '@global/types/Account'
-import { AccountContext } from '@global/contexts/AccountProvider'
-import { Alert } from 'react-native'
- 
-/**
- * @typedef {Object} useActionScreenControllerProps
- * @property {AccountType} account - Account of the user
- * @property {function} displayAdminCategory - Function to call to know if the admin category should be displayed
- * @property {function} onCategoryPress - Function to call when a category is pressed
- */
-interface useActionScreenControllerProps {
-  account: AccountType
-  displayAdminCategory: (categoryElevation?: AccountElevationEnum) => boolean
-  onCategoryPress: (categoryId: string) => void
-}
- 
-/**
- * @function useActionsScreenController
- * @description Business logic of the Actions screen
- * @returns {useActionScreenControllerProps} - Object containing the business logic of the screen
- */
-export default function useActionsScreenController(): useActionScreenControllerProps {
-  const { account } = useContext(AccountContext)
-  const navigation = useNavigation()
- 
-  /**
-   * @function displayAdminCategory
-   * @description Function to call to know if the admin category should be displayed
-   * @param categoryElevation - Elevation required to access the category
-   * @returns {boolean} - Boolean indicating if the admin category should be displayed
-   */
-  const displayAdminCategory = useCallback(
-    (categoryElevation?: AccountElevationEnum) => {
-      return account.elevation >= (categoryElevation ?? AccountElevationEnum.USER)
-    },
-    [account.elevation]
-  )
- 
-  /**
-   * @function onCategoryPress
-   * @description Function handling the press on a category
-   * @param categoryId - Id of the category pressed
-   */
-  function onCategoryPress(categoryId: string) {
-    switch (categoryId) {
-      case ContentCategoryId.ADDCONTENT:
-        if (account.elevation >= AccountElevationEnum.CREATOR) {
-          // eslint-disable-next-line @typescript-eslint/ban-ts-comment
-          // @ts-ignore
-          navigation.navigate('PlacesNeedingTranslation')
-        } else {
-          Alert.alert(
-            'Erreur de permission',
-            "Vous avez besoin d'un compte créateur pour accéder à cette fonctionnalité",
-            [
-              {
-                text: 'Annuler',
-                style: 'cancel',
-              },
-              {
-                text: 'Changer son profil pour créateur',
-                onPress: () => {
-                  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
-                  // @ts-ignore
-                  navigation.navigate('Home')
-                  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
-                  // @ts-ignore
-                  navigation.navigate('SettingsModal')
-                  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
-                  // @ts-ignore
-                  navigation.navigate('AccountModification')
-                },
-              },
-            ]
-          )
-        }
-        break
-      case ContentCategoryId.LIBRARY:
-        // eslint-disable-next-line @typescript-eslint/ban-ts-comment
-        // @ts-ignore
-        navigation.navigate('LibraryScreen')
-        break
-      case ContentCategoryId.COMMUNITY:
-        console.log('Pressed on community')
-        break
-      default:
-        console.log('Pressed on unexisting button')
-        break
-    }
-  }
- 
-  return {
-    account,
-    displayAdminCategory,
-    onCategoryPress,
-  }
-}
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/src/screens/authentificationSection/connection/ConnectionScreen.tsx.html b/src/screens/authentificationSection/connection/ConnectionScreen.tsx.html index 12f7cf8..59f42bd 100644 --- a/src/screens/authentificationSection/connection/ConnectionScreen.tsx.html +++ b/src/screens/authentificationSection/connection/ConnectionScreen.tsx.html @@ -550,7 +550,7 @@

All files / src/sc