mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-21 13:53:37 +00:00
[ios] Adding link to delete OSM profile page
Signed-off-by: Yannik Bloscheck <git@yannikbloscheck.com>
This commit is contained in:
@@ -58,15 +58,32 @@ struct ProfileView: View {
|
||||
.toolbar {
|
||||
ToolbarItem(placement: .destructiveAction) {
|
||||
if !isPresentedAsAlert, Profile.isExisting, !Profile.needsReauthorization {
|
||||
Button {
|
||||
Profile.logout()
|
||||
lastUpdated = Date.now
|
||||
Menu {
|
||||
Button {
|
||||
Profile.logout()
|
||||
lastUpdated = Date.now
|
||||
} label: {
|
||||
if #available(iOS 16, *) {
|
||||
Label("osm_profile_logout", systemImage: "rectangle.portrait.and.arrow.forward")
|
||||
} else {
|
||||
Label("osm_profile_logout", systemImage: "power")
|
||||
}
|
||||
}
|
||||
|
||||
Button(role: .destructive) {
|
||||
openUrl(Profile.deleteUrl)
|
||||
} label: {
|
||||
Label("osm_profile_delete", systemImage: "trash")
|
||||
}
|
||||
} label: {
|
||||
if #available(iOS 16, *) {
|
||||
Label("osm_profile_logout", systemImage: "rectangle.portrait.and.arrow.forward")
|
||||
} else {
|
||||
Label("osm_profile_logout", systemImage: "power")
|
||||
}
|
||||
} primaryAction: {
|
||||
Profile.logout()
|
||||
lastUpdated = Date.now
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user