parent
f4184bd459
commit
5587b9902a
|
@ -42,6 +42,7 @@ struct OrganizerView: View {
|
||||||
List {
|
List {
|
||||||
ActiveProfileView(profileManager: profileManager)
|
ActiveProfileView(profileManager: profileManager)
|
||||||
aboutSection
|
aboutSection
|
||||||
|
deleteSection
|
||||||
}
|
}
|
||||||
.navigationTitle(Unlocalized.appName)
|
.navigationTitle(Unlocalized.appName)
|
||||||
.themeTV()
|
.themeTV()
|
||||||
|
@ -63,6 +64,19 @@ private extension OrganizerView {
|
||||||
Text(L10n.About.title)
|
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
|
// MARK: Mock
|
||||||
|
|
Loading…
Reference in New Issue