new tests

This commit is contained in:
Mark Gregory
2026-10-19 10:56:20 +01:00
parent 82a54e7905
commit 1c30dc070d
+40 -10
View File
@@ -167,16 +167,45 @@ struct WorkbenchSettingsView: View {
@AppStorage("preferences.confirmDestructiveSQL") private var confirmDestructiveSQL = true @AppStorage("preferences.confirmDestructiveSQL") private var confirmDestructiveSQL = true
var body: some View { var body: some View {
NavigationSplitView { HStack(spacing: 0) {
List(SettingsSection.allCases, selection: $selectedSection) { section in VStack(alignment: .leading, spacing: 4) {
Text("DBSyn Settings")
.font(.headline)
.padding(.horizontal, 14)
.padding(.top, 18)
.padding(.bottom, 12)
ScrollView {
VStack(alignment: .leading, spacing: 3) {
ForEach(SettingsSection.allCases) { section in
Button {
selectedSection = section
} label: {
Label(section.rawValue, systemImage: section.icon) Label(section.rawValue, systemImage: section.icon)
.tag(section) .frame(maxWidth: .infinity, alignment: .leading)
.padding(.vertical, 3) .padding(.horizontal, 12)
.padding(.vertical, 9)
.background(
(selectedSection ?? .general) == section
? Color.accentColor.opacity(0.22)
: Color.clear,
in: RoundedRectangle(cornerRadius: 7)
)
} }
.listStyle(.sidebar) .buttonStyle(.plain)
.navigationTitle("Settings") .accessibilityIdentifier("settings.section.\(section.id)")
.frame(minWidth: 205) }
} detail: { }
.padding(.horizontal, 10)
}
}
.frame(width: 230)
.frame(maxHeight: .infinity, alignment: .top)
.background(Color(nsColor: .controlBackgroundColor))
Divider()
ScrollView {
Group { Group {
switch selectedSection ?? .general { switch selectedSection ?? .general {
case .general: generalSettings case .general: generalSettings
@@ -193,10 +222,11 @@ struct WorkbenchSettingsView: View {
case .advanced: advancedSettings case .advanced: advancedSettings
} }
} }
.frame(maxWidth: .infinity, alignment: .leading)
}
.frame(maxWidth: .infinity, maxHeight: .infinity) .frame(maxWidth: .infinity, maxHeight: .infinity)
} }
.navigationSplitViewStyle(.balanced) .frame(minWidth: 850, idealWidth: 1050, minHeight: 570, idealHeight: 710)
.frame(minWidth: 940, idealWidth: 1050, minHeight: 610, idealHeight: 710)
.preferredColorScheme(appearance == "dark" ? .dark : appearance == "light" ? .light : nil) .preferredColorScheme(appearance == "dark" ? .dark : appearance == "light" ? .light : nil)
} }