mirror of
https://github.com/XcodesOrg/XcodesApp.git
synced 2026-03-25 08:55:46 +00:00
Only show Sign Out button when actually authenticated
This commit is contained in:
parent
a0e258a937
commit
90c067997b
1 changed files with 2 additions and 2 deletions
|
|
@ -9,8 +9,8 @@ struct SettingsView: View {
|
|||
VStack(alignment: .leading) {
|
||||
GroupBox(label: Text("Apple ID")) {
|
||||
VStack(alignment: .leading) {
|
||||
if let username = Current.defaults.string(forKey: "username") {
|
||||
Text(username)
|
||||
if appState.authenticationState == .authenticated {
|
||||
Text(Current.defaults.string(forKey: "username") ?? "-")
|
||||
Button("Sign Out", action: appState.signOut)
|
||||
} else {
|
||||
Button("Sign In", action: { self.appState.presentingSignInAlert = true })
|
||||
|
|
|
|||
Loading…
Reference in a new issue