mirror of
https://github.com/writeas/writefreely-swiftui-multiplatform.git
synced 2024-11-15 01:11:02 +00:00
Show alert instead of sheet on logout
This commit is contained in:
parent
3c501cf67d
commit
ccb342fbc5
@ -43,22 +43,13 @@ struct AccountLogoutView: View {
|
|||||||
Text("Log Out")
|
Text("Log Out")
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
.sheet(isPresented: $isPresentingLogoutConfirmation) {
|
.alert(isPresented: $isPresentingLogoutConfirmation) {
|
||||||
VStack {
|
Alert(
|
||||||
Text("Log Out?")
|
title: Text("Log Out?"),
|
||||||
.font(.title)
|
message: Text("\(editedPostsWarningString)You won't lose any local posts. Are you sure?"),
|
||||||
Text("\(editedPostsWarningString)You won't lose any local posts. Are you sure?")
|
primaryButton: .cancel(Text("Cancel"), action: { self.isPresentingLogoutConfirmation = false }),
|
||||||
HStack {
|
secondaryButton: .destructive(Text("Log Out"), action: model.logout )
|
||||||
Button(action: model.logout, label: {
|
)
|
||||||
Text("Log Out")
|
|
||||||
})
|
|
||||||
Button(action: {
|
|
||||||
self.isPresentingLogoutConfirmation = false
|
|
||||||
}, label: {
|
|
||||||
Text("Cancel")
|
|
||||||
}).keyboardShortcut(.cancelAction)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user