parent
f4184bd459
commit
5587b9902a
|
@ -42,6 +42,7 @@ struct OrganizerView: View {
|
|||
List {
|
||||
ActiveProfileView(profileManager: profileManager)
|
||||
aboutSection
|
||||
deleteSection
|
||||
}
|
||||
.navigationTitle(Unlocalized.appName)
|
||||
.themeTV()
|
||||
|
@ -63,6 +64,19 @@ private extension OrganizerView {
|
|||
Text(L10n.About.title)
|
||||
}
|
||||
}
|
||||
|
||||
var deleteSection: some View {
|
||||
Section {
|
||||
Button(L10n.Global.Strings.delete, role: .destructive) {
|
||||
profileManager.activeProfileId.map { profileId in
|
||||
withAnimation {
|
||||
profileManager.removeProfiles(withIds: [profileId])
|
||||
}
|
||||
}
|
||||
}
|
||||
.disabled(!profileManager.hasActiveProfile)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: Mock
|
||||
|
|
Loading…
Reference in New Issue