Skip to content

Commit 8908d95

Browse files
signed in view
1 parent 77762b8 commit 8908d95

2 files changed

Lines changed: 25 additions & 3 deletions

File tree

FirebaseSwiftUI/FirebaseAuthSwiftUI/Sources/Utils/StringUtils.swift

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,27 @@ public class StringUtils {
181181
return localizedString(for: "SignInEmailSent")
182182
}
183183

184+
/// Account settings - Delete button label
185+
/// found in:
186+
/// - SignedInView
187+
public var deleteAccountButtonLabel: String {
188+
return localizedString(for: "AS_DeleteAccount")
189+
}
190+
191+
/// Account settings - Email label
192+
/// found in:
193+
/// SignedInView
194+
public var accountSettingsEmailLabel: String {
195+
return localizedString(for: "AS_Email")
196+
}
197+
198+
/// Account settings - sign out button label
199+
/// found in:
200+
/// - SignedInView
201+
public var signOutButtonLabel: String {
202+
return localizedString(for: "AS_SignOut")
203+
}
204+
184205
/// General string - Back button label
185206
/// found in:
186207
/// - PasswordRecoveryView

FirebaseSwiftUI/FirebaseAuthSwiftUI/Sources/Views/SignedInView.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,22 @@ extension SignedInView: View {
1919
.font(.largeTitle)
2020
.fontWeight(.bold)
2121
.padding()
22-
Text("User: \(authService.currentUser?.email ?? "Unknown")")
22+
Text(authService.string.accountSettingsEmailLabel)
23+
Text("\(authService.currentUser?.email ?? "Unknown")")
2324

2425
if authService.currentUser?.isEmailVerified == false {
2526
VerifyEmailView()
2627
}
2728

28-
Button("Sign out") {
29+
Button(authService.string.signOutButtonLabel) {
2930
Task {
3031
do {
3132
try await authService.signOut()
3233
} catch {}
3334
}
3435
}
3536
Divider()
36-
Button("Delete account") {
37+
Button(authService.string.deleteAccountButtonLabel) {
3738
Task {
3839
do {
3940
try await authService.deleteUser()

0 commit comments

Comments
 (0)