Move settings + generation to sheets

This commit is contained in:
Christoph Hagen
2025-02-05 15:40:09 +01:00
parent 5abe6e1a9f
commit 156bbf77d1
32 changed files with 402 additions and 852 deletions

View File

@@ -2,20 +2,18 @@ import SwiftUI
struct SettingsListView: View {
@EnvironmentObject
private var selection: SelectedContent
@Binding
var section: SettingsSection
var body: some View {
List(SettingsSection.allCases) { section in
Label(section.rawValue, systemSymbol: section.icon)
.listRowBackground(RoundedRectangle(cornerRadius: 5)
.fill(selection.section == section ? Color.blue : Color.clear)
.padding(.horizontal, 10)
)
.contentShape(Rectangle())
.onTapGesture {
selection.section = section
}
SelectableListItem(selected: self.section == section) {
Label(section.rawValue, systemSymbol: section.icon)
}
.onTapGesture {
self.section = section
}
}
}
}