macOS client parity review

This commit is contained in:
Ian Gulliver
2026-10-17 10:54:06 -07:00
parent b85de9a2d0
commit 31037e1c9f
24 changed files with 651 additions and 225 deletions
+18 -7
View File
@@ -150,16 +150,27 @@ private struct LeadNotes: View {
let groups = [("", "Every project")] + store.projects.map { ($0.id, $0.name) }
let current = groups.contains { $0.0 == project } ? project : ""
let shown = list.filter { ($0.projectId ?? "") == current }
Picker("", selection: Binding(get: { current }, set: { v in
project = v
notesProject = v
})) {
let label = { (g: (String, String)) in "\(g.1) (\(list.filter { ($0.projectId ?? "") == g.0 }.count))" }
Menu {
ForEach(groups, id: \.0) { g in
Text("\(g.1) (\(list.filter { ($0.projectId ?? "") == g.0 }.count))").tag(g.0)
Button(label(g)) {
project = g.0
notesProject = g.0
}
}
} label: {
HStack(spacing: 8) {
Text(label(groups.first { $0.0 == current } ?? groups[0]))
Image(systemName: "chevron.up.chevron.down")
.font(.system(size: 9, weight: .semibold))
}
.foregroundStyle(Palette.text)
.modifier(FieldStyle())
.contentShape(Rectangle())
}
.labelsHidden()
.pickerStyle(.menu)
.menuStyle(.button)
.buttonStyle(.plain)
.menuIndicator(.hidden)
.fixedSize()
.help("Which notes to show")
.padding(.bottom, 8)