diff --git a/mobile/app.json b/mobile/app.json index 69fc5a602dda22f61f9f4077ebdbaddc04690f80..384972acebb6dcf4953420af816652e47ae7ad93 100644 --- a/mobile/app.json +++ b/mobile/app.json @@ -6,7 +6,7 @@ "version": "1.0.0", "orientation": "portrait", "icon": "./assets/icon.png", - "userInterfaceStyle": "light", + "userInterfaceStyle": "automatic", "splash": { "image": "./assets/splash.png", "resizeMode": "contain", @@ -29,6 +29,26 @@ "favicon": "./assets/favicon.png" }, "plugins": [ + [ + "expo-screen-orientation", + { + "initialOrientation": "DEFAULT" + } + ], + [ + "expo-camera", + { + "cameraPermission": "Allow $(PRODUCT_NAME) to access your camera", + "microphonePermission": "Allow $(PRODUCT_NAME) to access your microphone", + "recordAudioAndroid": true + } + ], + [ + "expo-image-picker", + { + "photosPermission": "The app accesses your photos to let you share them with your friends." + } + ], "expo-router", "expo-secure-store" ], diff --git a/mobile/app/(tabs)/_layout.tsx b/mobile/app/(tabs)/_layout.tsx index 55ed70f32f84cf80dee8f4a668bb71c3dfa6f51c..acbdee433ea88ce8f214506973b40f3ed4a7370f 100644 --- a/mobile/app/(tabs)/_layout.tsx +++ b/mobile/app/(tabs)/_layout.tsx @@ -17,7 +17,14 @@ export default function Layout() { screenOptions={{ tabBarActiveTintColor: LIGTHT_THEME.color.primary, tabBarInactiveTintColor: LIGTHT_THEME.color.secondary, + headerStyle: { + backgroundColor: LIGTHT_THEME.color.primary, + }, + headerTitleStyle: { + color: LIGTHT_THEME.color.white, + }, headerTitleAlign: "center", + }} > - - - - ; + return ( + + + + + + + + ); } const MainLayout = () => { @@ -20,12 +25,12 @@ const MainLayout = () => { } return ( - - + + @@ -44,6 +49,13 @@ const MainLayout = () => { } } /> + ); }; diff --git a/mobile/app/profile/_layout.tsx b/mobile/app/profile/_layout.tsx new file mode 100644 index 0000000000000000000000000000000000000000..d6a99319a4d2db87a8c7b53d196892a6852c11c1 --- /dev/null +++ b/mobile/app/profile/_layout.tsx @@ -0,0 +1,12 @@ +import { Stack } from "expo-router"; + +export default function Layout() { + return ( + + + + ); +} \ No newline at end of file diff --git a/mobile/app/profile/edit.tsx b/mobile/app/profile/edit.tsx new file mode 100644 index 0000000000000000000000000000000000000000..bc3f55f0a3511544351b63c271acc630009e881a --- /dev/null +++ b/mobile/app/profile/edit.tsx @@ -0,0 +1,7 @@ +import { EditProfilePage } from "../../src/screens/edit_profile/edit_profile_page"; + +export default function EditProfileScreen() { + return ( + + ); +} \ No newline at end of file diff --git a/mobile/app/scan.tsx b/mobile/app/scan.tsx new file mode 100644 index 0000000000000000000000000000000000000000..7f00020bb6385157fe51d9f21efca1ab05c23bdd --- /dev/null +++ b/mobile/app/scan.tsx @@ -0,0 +1,113 @@ +import { View, Text, Button, StyleSheet, Animated } from "react-native"; +import { useQRScanner } from "../src/hooks/useQRScanner"; +import { CameraView } from "expo-camera/next"; +import { BarCodeScanningResult } from "expo-camera"; +import { useEffect, useRef } from "react"; + +export default function ScanScreen() { + const { hasPermission, getPermission, scanning, onQRScanned, qrData } = + useQRScanner(); + + const qrAnimation = useRef(new Animated.Value(0)).current; + + const startAnimation = () => { + Animated.loop( + Animated.sequence([ + Animated.timing(qrAnimation, { + toValue: 1, + duration: 1000, + useNativeDriver: true, + }), + Animated.timing(qrAnimation, { + toValue: 0, + duration: 1000, + useNativeDriver: true, + }), + ]) + ).start(); + }; + + useEffect(() => { + return () => { + qrAnimation.stopAnimation(); + }; + }, []); + + if (!hasPermission) { + return ( + + No permission +