diff --git a/app.json b/app.json index 8589eda..5d41040 100644 --- a/app.json +++ b/app.json @@ -52,9 +52,9 @@ "extra": { "router": {}, "eas": { - "projectId": "4f415b4b-41c8-4b98-989c-32f6b3f97481" + "projectId": "b06920f8-cbe7-4d6e-a5c2-5e60e1791d65" } }, - "owner": "serter2069ya" + "owner": "serter2069" } } diff --git a/app/(tabs)/chat.tsx b/app/(tabs)/chat.tsx index a236578..d7151b5 100644 --- a/app/(tabs)/chat.tsx +++ b/app/(tabs)/chat.tsx @@ -10,6 +10,7 @@ import { Platform, Modal, ActivityIndicator, + Keyboard, } from 'react-native'; import { Ionicons } from '@expo/vector-icons'; import { SafeAreaView } from 'react-native-safe-area-context'; @@ -249,6 +250,7 @@ Based on this data, please answer the following question: ${question}`; setMessages((prev) => [...prev, userMessage]); setInput(''); setIsSending(true); + Keyboard.dismiss(); try { const aiResponse = await sendWithContext(trimmedInput); diff --git a/app/(tabs)/profile.tsx b/app/(tabs)/profile.tsx index 80b0967..bfd6f98 100644 --- a/app/(tabs)/profile.tsx +++ b/app/(tabs)/profile.tsx @@ -6,7 +6,6 @@ import { ScrollView, TouchableOpacity, Alert, - Linking, } from 'react-native'; import { router } from 'expo-router'; import { Ionicons } from '@expo/vector-icons'; @@ -49,18 +48,15 @@ function MenuItem({ ); } -const TERMS_URL = 'https://wellnuo.com/terms'; -const PRIVACY_URL = 'https://wellnuo.com/privacy'; - export default function ProfileScreen() { const { user, logout } = useAuth(); const openTerms = () => { - Linking.openURL(TERMS_URL); + router.push('/terms'); }; const openPrivacy = () => { - Linking.openURL(PRIVACY_URL); + router.push('/privacy'); }; const handleLogout = () => { @@ -99,9 +95,6 @@ export default function ProfileScreen() { {user?.user_name || 'User'} - - Role: {user?.max_role === 2 ? 'Admin' : 'User'} - @@ -184,11 +177,6 @@ const styles = StyleSheet.create({ fontWeight: '600', color: AppColors.textPrimary, }, - userRole: { - fontSize: FontSizes.sm, - color: AppColors.textSecondary, - marginTop: Spacing.xs, - }, editButton: { width: 40, height: 40, diff --git a/app/_layout.tsx b/app/_layout.tsx index e7ce559..7433c20 100644 --- a/app/_layout.tsx +++ b/app/_layout.tsx @@ -45,6 +45,8 @@ function RootLayoutNav() { + + diff --git a/app/privacy.tsx b/app/privacy.tsx new file mode 100644 index 0000000..6408f9f --- /dev/null +++ b/app/privacy.tsx @@ -0,0 +1,78 @@ +import React from 'react'; +import { View, StyleSheet, TouchableOpacity, Text, ActivityIndicator } from 'react-native'; +import { WebView } from 'react-native-webview'; +import { router } from 'expo-router'; +import { Ionicons } from '@expo/vector-icons'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { AppColors, FontSizes, Spacing } from '@/constants/theme'; + +const PRIVACY_URL = 'https://wellnuo.com/privacy'; + +export default function PrivacyScreen() { + const [loading, setLoading] = React.useState(true); + + return ( + + + router.back()}> + + + Privacy Policy + + + + {loading && ( + + + + )} + + setLoading(false)} + startInLoadingState={false} + /> + + ); +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + backgroundColor: AppColors.background, + }, + header: { + flexDirection: 'row', + alignItems: 'center', + justifyContent: 'space-between', + paddingHorizontal: Spacing.md, + paddingVertical: Spacing.sm, + borderBottomWidth: 1, + borderBottomColor: AppColors.border, + }, + backButton: { + padding: Spacing.xs, + }, + title: { + fontSize: FontSizes.lg, + fontWeight: '600', + color: AppColors.textPrimary, + }, + placeholder: { + width: 32, + }, + loadingContainer: { + position: 'absolute', + top: 80, + left: 0, + right: 0, + bottom: 0, + justifyContent: 'center', + alignItems: 'center', + zIndex: 1, + }, + webview: { + flex: 1, + }, +}); diff --git a/app/terms.tsx b/app/terms.tsx new file mode 100644 index 0000000..9ea1b5b --- /dev/null +++ b/app/terms.tsx @@ -0,0 +1,78 @@ +import React from 'react'; +import { View, StyleSheet, TouchableOpacity, Text, ActivityIndicator } from 'react-native'; +import { WebView } from 'react-native-webview'; +import { router } from 'expo-router'; +import { Ionicons } from '@expo/vector-icons'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { AppColors, FontSizes, Spacing } from '@/constants/theme'; + +const TERMS_URL = 'https://wellnuo.com/terms'; + +export default function TermsScreen() { + const [loading, setLoading] = React.useState(true); + + return ( + + + router.back()}> + + + Terms of Service + + + + {loading && ( + + + + )} + + setLoading(false)} + startInLoadingState={false} + /> + + ); +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + backgroundColor: AppColors.background, + }, + header: { + flexDirection: 'row', + alignItems: 'center', + justifyContent: 'space-between', + paddingHorizontal: Spacing.md, + paddingVertical: Spacing.sm, + borderBottomWidth: 1, + borderBottomColor: AppColors.border, + }, + backButton: { + padding: Spacing.xs, + }, + title: { + fontSize: FontSizes.lg, + fontWeight: '600', + color: AppColors.textPrimary, + }, + placeholder: { + width: 32, + }, + loadingContainer: { + position: 'absolute', + top: 80, + left: 0, + right: 0, + bottom: 0, + justifyContent: 'center', + alignItems: 'center', + zIndex: 1, + }, + webview: { + flex: 1, + }, +}); diff --git a/eas.json b/eas.json index c3779fa..0c0d7f9 100644 --- a/eas.json +++ b/eas.json @@ -12,7 +12,10 @@ "distribution": "internal" }, "production": { - "autoIncrement": true + "autoIncrement": true, + "ios": { + "credentialsSource": "remote" + } } }, "submit": { diff --git a/package.json b/package.json index 17b3905..9f43e47 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,8 @@ "scripts": { "start": "expo start", "reset-project": "node ./scripts/reset-project.js", - "android": "expo start --android", - "ios": "expo start --ios", + "android": "expo run:android", + "ios": "expo run:ios", "web": "expo start --web", "lint": "expo lint" },