@umituz/react-native-auth 2.6.1 → 2.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-auth",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.3",
|
|
4
4
|
"description": "Authentication service for React Native apps - Secure, type-safe, and production-ready. Provider-agnostic design with dependency injection, configurable validation, and comprehensive error handling.",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"@umituz/react-native-design-system-theme": "latest",
|
|
36
36
|
"@umituz/react-native-firebase-auth": "latest",
|
|
37
37
|
"@umituz/react-native-localization": "latest",
|
|
38
|
+
"@umituz/react-native-avatar": "latest",
|
|
38
39
|
"@umituz/react-native-storage": "latest",
|
|
39
40
|
"@umituz/react-native-validation": "latest",
|
|
40
41
|
"expo-linear-gradient": ">=13.0.0",
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import React from "react";
|
|
8
8
|
import { View, Text, TouchableOpacity, StyleSheet } from "react-native";
|
|
9
9
|
import { useAppDesignTokens } from "@umituz/react-native-design-system-theme";
|
|
10
|
+
import { Avatar } from "@umituz/react-native-avatar";
|
|
10
11
|
|
|
11
12
|
export interface ProfileSectionConfig {
|
|
12
13
|
displayName: string;
|
|
@@ -42,14 +43,7 @@ export const ProfileSection: React.FC<ProfileSectionProps> = ({
|
|
|
42
43
|
}
|
|
43
44
|
};
|
|
44
45
|
|
|
45
|
-
|
|
46
|
-
return name
|
|
47
|
-
.split(" ")
|
|
48
|
-
.map((n) => n[0])
|
|
49
|
-
.join("")
|
|
50
|
-
.toUpperCase()
|
|
51
|
-
.slice(0, 2);
|
|
52
|
-
};
|
|
46
|
+
|
|
53
47
|
|
|
54
48
|
return (
|
|
55
49
|
<TouchableOpacity
|
|
@@ -60,23 +54,13 @@ export const ProfileSection: React.FC<ProfileSectionProps> = ({
|
|
|
60
54
|
>
|
|
61
55
|
<View style={styles.content}>
|
|
62
56
|
{/* Avatar */}
|
|
63
|
-
<View
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
{
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
<Text style={styles.avatarText}>
|
|
71
|
-
{getInitials(profile.displayName)}
|
|
72
|
-
</Text>
|
|
73
|
-
) : (
|
|
74
|
-
<Text
|
|
75
|
-
style={[styles.avatarText, { color: tokens.colors.onPrimary }]}
|
|
76
|
-
>
|
|
77
|
-
{getInitials(profile.displayName)}
|
|
78
|
-
</Text>
|
|
79
|
-
)}
|
|
57
|
+
<View style={styles.avatarContainer}>
|
|
58
|
+
<Avatar
|
|
59
|
+
uri={profile.avatarUrl}
|
|
60
|
+
name={profile.displayName || (profile.isAnonymous ? anonymousText : signInText)}
|
|
61
|
+
size="md"
|
|
62
|
+
shape="circle"
|
|
63
|
+
/>
|
|
80
64
|
</View>
|
|
81
65
|
|
|
82
66
|
{/* User Info */}
|
|
@@ -161,18 +145,9 @@ const styles = StyleSheet.create({
|
|
|
161
145
|
flexDirection: "row",
|
|
162
146
|
alignItems: "center",
|
|
163
147
|
},
|
|
164
|
-
|
|
165
|
-
width: 56,
|
|
166
|
-
height: 56,
|
|
167
|
-
borderRadius: 28,
|
|
168
|
-
justifyContent: "center",
|
|
169
|
-
alignItems: "center",
|
|
148
|
+
avatarContainer: {
|
|
170
149
|
marginRight: 12,
|
|
171
150
|
},
|
|
172
|
-
avatarText: {
|
|
173
|
-
fontSize: 20,
|
|
174
|
-
fontWeight: "600",
|
|
175
|
-
},
|
|
176
151
|
info: {
|
|
177
152
|
flex: 1,
|
|
178
153
|
},
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
ActivityIndicator,
|
|
16
16
|
} from "react-native";
|
|
17
17
|
import { useAppDesignTokens } from "@umituz/react-native-design-system-theme";
|
|
18
|
+
import { Avatar } from "@umituz/react-native-avatar";
|
|
18
19
|
|
|
19
20
|
export interface EditProfileConfig {
|
|
20
21
|
displayName: string;
|
|
@@ -66,6 +67,16 @@ export const EditProfileScreen: React.FC<EditProfileScreenProps> = ({
|
|
|
66
67
|
{config.labels.title}
|
|
67
68
|
</Text>
|
|
68
69
|
|
|
70
|
+
{/* Avatar */}
|
|
71
|
+
<View style={styles.avatarContainer}>
|
|
72
|
+
<Avatar
|
|
73
|
+
uri={config.photoURL || undefined}
|
|
74
|
+
name={config.displayName}
|
|
75
|
+
size="xl"
|
|
76
|
+
shape="circle"
|
|
77
|
+
/>
|
|
78
|
+
</View>
|
|
79
|
+
|
|
69
80
|
{/* Display Name */}
|
|
70
81
|
<View style={styles.field}>
|
|
71
82
|
<Text style={[styles.label, { color: tokens.colors.textSecondary }]}>
|
|
@@ -182,6 +193,10 @@ const styles = StyleSheet.create({
|
|
|
182
193
|
fontWeight: "600",
|
|
183
194
|
marginBottom: 24,
|
|
184
195
|
},
|
|
196
|
+
avatarContainer: {
|
|
197
|
+
alignItems: "center",
|
|
198
|
+
marginBottom: 24,
|
|
199
|
+
},
|
|
185
200
|
field: {
|
|
186
201
|
marginBottom: 20,
|
|
187
202
|
},
|