This commit is contained in:
fmodf 2024-10-07 18:16:00 +02:00
parent 965b4d4f38
commit bb76ac49a1

View file

@ -58,9 +58,17 @@ struct SettingsScreen: View {
controlType: .none controlType: .none
) )
.onTapGesture { .onTapGesture {
router.showAlert(
.alert,
title: "Delete data",
subtitle: "Delete all data from the app?"
) {
Button("Delete", role: .destructive) {
clientsStore.flushAllData() clientsStore.flushAllData()
Database.shared.flushAllData() Database.shared.flushAllData()
} }
}
}
#endif #endif
} }
.listStyle(.plain) .listStyle(.plain)