Start fixing simple Android issues
This commit is contained in:
@ -7,7 +7,7 @@ const HomeScreen = () => {
|
||||
return (
|
||||
<ParallaxScrollView
|
||||
headerImage={
|
||||
<Image source={require('@/assets/images/tech_tracker_logo.png')} style={styles.reactLogo} />
|
||||
<Image source={require('@/assets/images/tech_tracker_logo.png')} style={styles.techTrackerLogo} />
|
||||
}
|
||||
headerTitle={
|
||||
<ThemedText type='title' style={styles.headerTitle}>
|
||||
@ -33,17 +33,17 @@ const styles = StyleSheet.create({
|
||||
gap: 8,
|
||||
marginBottom: 8,
|
||||
},
|
||||
reactLogo: {
|
||||
techTrackerLogo: {
|
||||
height: 70,
|
||||
width: 72,
|
||||
bottom: 10,
|
||||
left: 40,
|
||||
left: Platform.OS === 'ios' ? 40 : 20,
|
||||
position: 'absolute',
|
||||
},
|
||||
headerTitle: {
|
||||
position: 'absolute',
|
||||
bottom: 20,
|
||||
left: 75,
|
||||
left: 80,
|
||||
right: 0,
|
||||
textAlign: 'center',
|
||||
fontSize: 48,
|
||||
|
@ -3,8 +3,11 @@ import { useRouter } from 'expo-router';
|
||||
import ParallaxScrollView from '@/components/default/ParallaxScrollView';
|
||||
import { ThemedText, ThemedTextButton, ThemedView } from '@/components/theme';
|
||||
import { IconSymbol } from '@/components/ui/IconSymbol';
|
||||
import { Colors } from '@/constants/Colors';
|
||||
import { useColorScheme } from '@/hooks/useColorScheme';
|
||||
|
||||
const SettingsScreen = () => {
|
||||
const scheme = useColorScheme() ?? 'dark';
|
||||
const router = useRouter();
|
||||
|
||||
return (
|
||||
@ -20,7 +23,7 @@ const SettingsScreen = () => {
|
||||
>
|
||||
<ThemedView style={styles.section}>
|
||||
<TouchableOpacity
|
||||
style={styles.settingItem}
|
||||
style={[styles.settingItem, {backgroundColor: Colors[scheme].card}]}
|
||||
onPress={() => router.push('/settings/profile')}
|
||||
>
|
||||
<IconSymbol name="person.fill" size={24} color="#007AFF" style={styles.icon} />
|
||||
@ -67,7 +70,6 @@ const styles = StyleSheet.create({
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
padding: 16,
|
||||
backgroundColor: 'rgba(200, 200, 200, 0.1)',
|
||||
marginBottom: 1,
|
||||
},
|
||||
icon: {
|
||||
|
@ -3,6 +3,7 @@ import {
|
||||
StyleSheet,
|
||||
Alert,
|
||||
ActivityIndicator,
|
||||
ScrollView,
|
||||
} from 'react-native';
|
||||
import { supabase } from '@/lib/supabase';
|
||||
import { ThemedView, ThemedText, ThemedTextButton, ThemedTextInput } from '@/components/theme';
|
||||
@ -107,53 +108,58 @@ const ProfileScreen = () => {
|
||||
}
|
||||
|
||||
return (
|
||||
<ScrollView
|
||||
contentContainerStyle={styles.scrollContainer}
|
||||
keyboardShouldPersistTaps='never'
|
||||
>
|
||||
<ThemedView style={styles.container}>
|
||||
<ThemedView style={styles.avatarContainer}>
|
||||
<ProfileAvatar
|
||||
url={profile.avatar_url}
|
||||
size={120}
|
||||
onUpload={handleAvatarUpload}
|
||||
disabled={updating}
|
||||
<ThemedView style={styles.avatarContainer}>
|
||||
<ProfileAvatar
|
||||
url={profile.avatar_url}
|
||||
size={120}
|
||||
onUpload={handleAvatarUpload}
|
||||
disabled={updating}
|
||||
/>
|
||||
</ThemedView>
|
||||
|
||||
{profile.provider && (
|
||||
<ThemedText style={styles.providerText}>
|
||||
Signed in with {profile.provider.charAt(0).toUpperCase() + profile.provider.slice(1)}
|
||||
</ThemedText>
|
||||
)}
|
||||
<ThemedView style={styles.formSection}>
|
||||
<ThemedText type='title' style={styles.label}>Name</ThemedText>
|
||||
<ThemedTextInput
|
||||
value={profile.full_name}
|
||||
onChangeText={(text) => setProfile(prev => ({ ...prev, full_name: text }))}
|
||||
placeholder="Enter your full name"
|
||||
style={styles.input}
|
||||
editable={!updating}
|
||||
autoCapitalize='words'
|
||||
textContentType='name'
|
||||
maxLength={50}
|
||||
returnKeyType='done'
|
||||
/>
|
||||
</ThemedView>
|
||||
|
||||
<ThemedTextButton
|
||||
text={updating ? 'Saving...' : 'Save Changes'}
|
||||
onPress={updateProfile}
|
||||
disabled={updating || !profile.full_name.trim()}
|
||||
fontSize={18}
|
||||
fontWeight='semibold'
|
||||
width='90%'
|
||||
style={styles.saveButton}
|
||||
/>
|
||||
</ThemedView>
|
||||
|
||||
{profile.provider && (
|
||||
<ThemedText style={styles.providerText}>
|
||||
Signed in with {profile.provider.charAt(0).toUpperCase() + profile.provider.slice(1)}
|
||||
</ThemedText>
|
||||
)}
|
||||
<ThemedView style={styles.formSection}>
|
||||
<ThemedText type='title' style={styles.label}>Name</ThemedText>
|
||||
<ThemedTextInput
|
||||
value={profile.full_name}
|
||||
onChangeText={(text) => setProfile(prev => ({ ...prev, full_name: text }))}
|
||||
placeholder="Enter your full name"
|
||||
style={styles.input}
|
||||
editable={!updating}
|
||||
autoCapitalize='words'
|
||||
textContentType='name'
|
||||
maxLength={50}
|
||||
returnKeyType='done'
|
||||
|
||||
<LogoutButton
|
||||
fontSize={18}
|
||||
fontWeight='semibold'
|
||||
width='90%'
|
||||
style={styles.logoutButton}
|
||||
/>
|
||||
</ThemedView>
|
||||
|
||||
<ThemedTextButton
|
||||
text={updating ? 'Saving...' : 'Save Changes'}
|
||||
onPress={updateProfile}
|
||||
disabled={updating || !profile.full_name.trim()}
|
||||
fontSize={18}
|
||||
fontWeight='semibold'
|
||||
width='90%'
|
||||
style={styles.saveButton}
|
||||
/>
|
||||
|
||||
<LogoutButton
|
||||
fontSize={18}
|
||||
fontWeight='semibold'
|
||||
width='90%'
|
||||
style={styles.logoutButton}
|
||||
/>
|
||||
</ThemedView>
|
||||
</ScrollView>
|
||||
);
|
||||
};
|
||||
export default ProfileScreen;
|
||||
|
Reference in New Issue
Block a user