File tree Expand file tree Collapse file tree 8 files changed +26
-26
lines changed
FirebaseAuthSwiftUI/Sources/Views
FirebaseFacebookSwiftUI/Sources/Views
FirebaseGoogleSwiftUI/Sources/Views
FirebasePhoneAuthSwiftUI/Sources/Views Expand file tree Collapse file tree 8 files changed +26
-26
lines changed Original file line number Diff line number Diff line change @@ -38,11 +38,11 @@ extension AuthPickerView: View {
38
38
withAnimation {
39
39
switchFlow ( )
40
40
}
41
- } ) {
41
+ } , label : {
42
42
Text ( authService. authenticationFlow == . signUp ? " Log in " : " Sign up " )
43
43
. fontWeight ( . semibold)
44
44
. foregroundColor ( . blue)
45
- }
45
+ } )
46
46
}
47
47
Text ( authService. errorMessage) . foregroundColor ( . red)
48
48
}
Original file line number Diff line number Diff line change @@ -82,9 +82,9 @@ extension EmailAuthView: View {
82
82
if authService. authenticationFlow == . login {
83
83
Button ( action: {
84
84
authService. authView = . passwordRecovery
85
- } ) {
85
+ } , label : {
86
86
Text ( " Forgotten Password? " )
87
- }
87
+ } )
88
88
}
89
89
90
90
if authService. authenticationFlow == . signUp {
@@ -108,7 +108,7 @@ extension EmailAuthView: View {
108
108
if authService. authenticationFlow == . login { await signInWithEmailPassword ( ) }
109
109
else { await createUserWithEmailPassword ( ) }
110
110
}
111
- } ) {
111
+ } , label : {
112
112
if authService. authenticationState != . authenticating {
113
113
Text ( authService. authenticationFlow == . login ? " Log in with password " : " Sign up " )
114
114
. padding ( . vertical, 8 )
@@ -119,16 +119,16 @@ extension EmailAuthView: View {
119
119
. padding ( . vertical, 8 )
120
120
. frame ( maxWidth: . infinity)
121
121
}
122
- }
122
+ } )
123
123
. disabled ( !isValid)
124
124
. padding ( [ . top, . bottom] , 8 )
125
125
. frame ( maxWidth: . infinity)
126
126
. buttonStyle ( . borderedProminent)
127
127
Button ( action: {
128
128
authService. authView = . passwordRecovery
129
- } ) {
129
+ } , label : {
130
130
Text ( " Prefer Email link sign-in? " )
131
- }
131
+ } )
132
132
}
133
133
}
134
134
}
Original file line number Diff line number Diff line change @@ -35,11 +35,11 @@ extension EmailLinkView: View {
35
35
await sendEmailLink ( )
36
36
authService. emailLink = email
37
37
}
38
- } ) {
38
+ } , label : {
39
39
Text ( " Send email sign-in link " )
40
40
. padding ( . vertical, 8 )
41
41
. frame ( maxWidth: . infinity)
42
- }
42
+ } )
43
43
. disabled ( !CommonUtils. isValidEmail ( email) )
44
44
. padding ( [ . top, . bottom] , 8 )
45
45
. frame ( maxWidth: . infinity)
@@ -66,11 +66,11 @@ extension EmailLinkView: View {
66
66
}
67
67
. navigationBarItems ( leading: Button ( action: {
68
68
authService. authView = . authPicker
69
- } ) {
69
+ } , label : {
70
70
Image ( systemName: " chevron.left " )
71
71
. foregroundColor ( . blue)
72
72
Text ( " Back " )
73
73
. foregroundColor ( . blue)
74
- } )
74
+ } ) )
75
75
}
76
76
}
Original file line number Diff line number Diff line change @@ -33,11 +33,11 @@ extension PasswordRecoveryView: View {
33
33
Task {
34
34
await sendPasswordRecoveryEmail ( )
35
35
}
36
- } ) {
36
+ } , label : {
37
37
Text ( " Password Recovery " )
38
38
. padding ( . vertical, 8 )
39
39
. frame ( maxWidth: . infinity)
40
- }
40
+ } )
41
41
. disabled ( !CommonUtils. isValidEmail ( email) )
42
42
. padding ( [ . top, . bottom] , 8 )
43
43
. frame ( maxWidth: . infinity)
@@ -59,11 +59,11 @@ extension PasswordRecoveryView: View {
59
59
}
60
60
. navigationBarItems ( leading: Button ( action: {
61
61
authService. authView = . authPicker
62
- } ) {
62
+ } , label : {
63
63
Image ( systemName: " chevron.left " )
64
64
. foregroundColor ( . blue)
65
65
Text ( " Back " )
66
66
. foregroundColor ( . blue)
67
- } )
67
+ } ) )
68
68
}
69
69
}
Original file line number Diff line number Diff line change @@ -19,11 +19,11 @@ extension VerifyEmailView: View {
19
19
Task {
20
20
await sendEmailVerification ( )
21
21
}
22
- } ) {
22
+ } , label : {
23
23
Text ( " Verify email address? " )
24
24
. padding ( . vertical, 8 )
25
25
. frame ( maxWidth: . infinity)
26
- }
26
+ } )
27
27
. padding ( [ . top, . bottom] , 8 )
28
28
. frame ( maxWidth: . infinity)
29
29
. buttonStyle ( . borderedProminent)
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ extension SignInWithFacebookButton: View {
60
60
}
61
61
}
62
62
}
63
- } ) {
63
+ } , label : {
64
64
HStack {
65
65
Image ( systemName: " f.circle.fill " )
66
66
. font ( . title)
@@ -73,7 +73,7 @@ extension SignInWithFacebookButton: View {
73
73
. frame ( maxWidth: . infinity)
74
74
. background ( Color . blue)
75
75
. cornerRadius ( 8 )
76
- }
76
+ } )
77
77
. alert ( isPresented: $showCanceledAlert) {
78
78
Alert (
79
79
title: Text ( " Facebook login cancelled " ) ,
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ extension SignInWithGoogleButton: View {
20
20
Task {
21
21
try await signInWithGoogle ( )
22
22
}
23
- } ) {
23
+ } , label : {
24
24
if authService. authenticationState != . authenticating {
25
25
HStack {
26
26
Image ( systemName: " globe " ) // Placeholder for Google logo
@@ -46,6 +46,6 @@ extension SignInWithGoogleButton: View {
46
46
. padding ( . vertical, 8 )
47
47
. frame ( maxWidth: . infinity)
48
48
}
49
- }
49
+ } )
50
50
}
51
51
}
Original file line number Diff line number Diff line change @@ -39,11 +39,11 @@ extension PhoneAuthButtonView: View {
39
39
)
40
40
}
41
41
}
42
- } ) {
42
+ } , label : {
43
43
Text ( " Send SMS code " )
44
44
. padding ( . vertical, 8 )
45
45
. frame ( maxWidth: . infinity)
46
- }
46
+ } )
47
47
. disabled ( !PhoneUtils. isValidPhoneNumber ( phoneNumber) )
48
48
. padding ( [ . top, . bottom] , 8 )
49
49
. frame ( maxWidth: . infinity)
@@ -69,15 +69,15 @@ extension PhoneAuthButtonView: View {
69
69
}
70
70
showVerificationCodeInput = false
71
71
}
72
- } ) {
72
+ } , label : {
73
73
Text ( " Verify phone number and sign-in " )
74
74
. foregroundColor ( . white)
75
75
. padding ( )
76
76
. frame ( maxWidth: . infinity)
77
77
. background ( Color . green)
78
78
. cornerRadius ( 8 )
79
79
. padding ( . horizontal)
80
- }
80
+ } )
81
81
} . onOpenURL { url in
82
82
authService. auth. canHandle ( url)
83
83
}
You can’t perform that action at this time.
0 commit comments