Neues Design 'Leuchttisch' (warmes Graphit, Bernstein-Akzent) für alle Fenster; Lupe im Studio-Layout (Filmstreifen + IPTC-Panel mit ⌘N/⌘B); Matchday-Ansicht (Teamleiste, Spielerinnen-Liste, Teamfilter, Kacheln mit Teamfarbe + Nummer)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012bGzgsxrmbBhDzeMV2L57D
This commit is contained in:
Lichtkasten DevandClaude Opus 5.5 committed 2026-11-04 15:40:53 +00:00
1 parent 44f995c3d0
commit 7a349b8c34
13 files changed
+920 -203

No files matched your search

+103 -84
View File
@@ -16,8 +16,9 @@ struct ContentView: View {
} detail: {
VStack(spacing: 0) {
TabBar()
if state.folder != nil && state.matchdayActive { MatchdayHeader() }
if state.folder != nil { ContactSheetHeader() }
Divider()
Rectangle().fill(LK.border).frame(height: 1)
if state.folder == nil {
EmptyStateView()
} else if state.items.isEmpty && !state.loadingMetadata {
@@ -29,7 +30,10 @@ struct ContentView: View {
}
PMStatusBar()
}
.background(LK.ground)
}
.preferredColorScheme(.dark)
.tint(LK.amber)
.navigationTitle(state.folder?.lastPathComponent ?? "Lichtkasten")
.toolbar { MainToolbar() }
.searchable(text: $state.searchText, placement: .toolbar, prompt: "Dateiname, IPTC …")
@@ -117,36 +121,41 @@ struct TabBar: View {
@EnvironmentObject var state: AppState
var body: some View {
HStack(spacing: 4) {
HStack(spacing: 6) {
ForEach(state.tabs, id: \.self) { url in
let active = state.folder == url
HStack(spacing: 6) {
Button { state.closeTab(url) } label: { Image(systemName: "xmark.circle.fill") }
.buttonStyle(.plain).foregroundStyle(.secondary)
Image(systemName: "folder.fill").foregroundStyle(.secondary)
Text(url.lastPathComponent).lineLimit(1)
HStack(spacing: 8) {
Button { state.closeTab(url) } label: { Image(systemName: "xmark").font(.system(size: 9, weight: .bold)) }
.buttonStyle(.plain).foregroundStyle(LK.muted)
.help("Tab schließen")
Text(url.lastPathComponent).font(.system(size: 13, weight: active ? .bold : .medium)).lineLimit(1)
.foregroundStyle(active ? LK.text : LK.text2)
if active {
Text("\(state.visible.count)")
.font(.caption.monospacedDigit())
.padding(.horizontal, 5)
.background(Capsule().fill(Color.secondary.opacity(0.3)))
.font(LK.mono(11, .medium))
.foregroundStyle(LK.onAmber)
.padding(.horizontal, 7).padding(.vertical, 1)
.background(Capsule().fill(LK.amber))
}
}
.padding(.horizontal, 8)
.padding(.vertical, 3)
.background(RoundedRectangle(cornerRadius: 5).fill(active ? Color.secondary.opacity(0.28) : Color.clear))
.padding(.horizontal, 12)
.frame(height: 30)
.background(RoundedRectangle(cornerRadius: 8).fill(active ? LK.selected : Color.clear))
.overlay(RoundedRectangle(cornerRadius: 8).stroke(active ? LK.borderStrong : Color.clear))
.contentShape(Rectangle())
.onTapGesture { state.open(folder: url) }
.help(url.path)
}
Button { state.newTab() } label: { Image(systemName: "plus.circle") }
Button { state.newTab() } label: { Image(systemName: "plus").font(.system(size: 12, weight: .semibold)) }
.buttonStyle(.plain)
.help("Neuer Tab")
.foregroundStyle(LK.muted)
.frame(width: 28, height: 28)
.help("Neuer Tab (⌘T)")
Spacer()
}
.padding(.horizontal, 8)
.padding(.vertical, 4)
.background(.bar)
.padding(.horizontal, 14)
.padding(.vertical, 6)
.background(LK.bar)
}
}
@@ -156,78 +165,74 @@ struct ContactSheetHeader: View {
@EnvironmentObject var state: AppState
var body: some View {
HStack(spacing: 12) {
HStack(spacing: 14) {
LKSegmented(options: [(TagFilter.all, "Alle"), (TagFilter.tagged, "Getaggt"), (TagFilter.untagged, "Nicht getaggt")],
selection: $state.filter.tag)
Button { state.filter.suggestionsOnly.toggle() } label: {
Label("Vorschläge", systemImage: "person.text.rectangle")
.font(.system(size: 12, weight: .semibold))
.foregroundStyle(state.filter.suggestionsOnly ? LK.onAmber : LK.text2)
.padding(.horizontal, 10).frame(height: 28)
.background(RoundedRectangle(cornerRadius: 8).fill(state.filter.suggestionsOnly ? LK.amber : LK.raised))
}
.buttonStyle(.plain)
.help("Nur Bilder mit offenen Spieler-Vorschlägen")
Menu {
Picker("Sortierung", selection: $state.sortOrder) {
ForEach(SortOrder.allCases, id: \.self) { Text($0.rawValue).tag($0) }
}
Toggle("Umkehren", isOn: $state.reverseSort)
} label: {
Text("\(state.sortOrder.rawValue) \(state.reverseSort ? "↑" : "↓")").font(.system(size: 13)).foregroundStyle(LK.text2)
}
.menuStyle(.borderlessButton)
.fixedSize()
Slider(value: $state.settings.thumbnailSize, in: 120...max(200, state.settings.maxThumbnailSize))
.frame(width: 140)
.frame(width: 120)
.help("Vorschaugröße")
Picker("", selection: $state.sortOrder) {
ForEach(SortOrder.allCases, id: \.self) { Text($0.rawValue).tag($0) }
}
.labelsHidden()
.frame(width: 140)
Toggle("Umkehren", isOn: $state.reverseSort).toggleStyle(.checkbox)
Picker("", selection: $state.filter.tag) {
ForEach(TagFilter.allCases, id: \.self) { Text($0.rawValue).tag($0) }
}
.labelsHidden()
.frame(width: 130)
Spacer(minLength: 8)
// Stars filter (PM: checkbox + 0★…5★ toggles)
Toggle("", isOn: $state.filter.ratingOn).toggleStyle(.checkbox).labelsHidden()
.help("Nach Sternen filtern")
HStack(spacing: 0) {
// Stars: toggles 0…5 (several possible), amber when on
HStack(spacing: 2) {
ForEach(0...5, id: \.self) { n in
let on = state.filter.ratings.contains(n)
Button { toggle(rating: n) } label: {
Text("\(n)★").font(.system(size: 11, weight: on ? .bold : .regular))
.frame(width: 30, height: 20)
.background(on ? Color.accentColor.opacity(0.45) : Color.secondary.opacity(0.15))
Text(n == 0 ? "0" : String(repeating: "★", count: 1) + "\(n)")
.font(.system(size: 11, weight: on ? .bold : .medium))
.foregroundStyle(on ? LK.onAmber : LK.text2)
.frame(width: 30, height: 24)
.background(RoundedRectangle(cornerRadius: 6).fill(on ? LK.amber : LK.raised))
}
.buttonStyle(.plain)
.help(n == 0 ? "Ohne Sterne" : "\(n) Stern(e)")
}
}
.clipShape(RoundedRectangle(cornerRadius: 4))
.opacity(state.filter.ratingOn ? 1 : 0.5)
Toggle(isOn: $state.filter.suggestionsOnly) {
Label("Vorschläge", systemImage: "person.text.rectangle")
}
.toggleStyle(.button)
.help("Nur Bilder mit offenen Spieler-Vorschlägen (Trikotnummern)")
Rectangle().fill(LK.borderStrong).frame(width: 1, height: 22)
// Color class filter (PM: checkbox + color swatches, last = no color)
Toggle("", isOn: $state.filter.colorOn).toggleStyle(.checkbox).labelsHidden()
.help("Nach Farbklasse filtern")
HStack(spacing: 0) {
ForEach(ColorLabel.allCases, id: \.self) { l in
swatch(l.color, n: l.pmColorClass, help: "\(l.pmColorClass) – \(l.germanName)")
}
swatch(.clear, n: 0, help: "Ohne Farbklasse")
// Color classes as dots; ring = active filter
HStack(spacing: 7) {
ForEach(ColorLabel.allCases, id: \.self) { l in dot(l.lkColor, n: l.pmColorClass, help: "\(l.pmColorClass) – \(l.germanName)") }
dot(LK.faint, n: 0, help: "Ohne Farbklasse")
}
.clipShape(RoundedRectangle(cornerRadius: 4))
.opacity(state.filter.colorOn ? 1 : 0.5)
}
.padding(.horizontal, 10)
.padding(.vertical, 6)
.padding(.horizontal, 20)
.frame(height: 54)
.background(LK.ground)
}
private func swatch(_ c: Color, n: Int, help: String) -> some View {
private func dot(_ c: Color, n: Int, help: String) -> some View {
let on = state.filter.colors.contains(n)
return Button { toggle(color: n) } label: {
ZStack {
if n == 0 {
Image(systemName: "checkerboard.rectangle").font(.system(size: 12)).foregroundStyle(.secondary)
} else {
c
}
if on { Image(systemName: "checkmark").font(.system(size: 10, weight: .bold)).foregroundStyle(.white).shadow(radius: 1) }
}
.frame(width: 20, height: 20)
.overlay(Rectangle().stroke(on ? Color.white : Color.clear, lineWidth: 1.5))
Circle().fill(c)
.frame(width: 15, height: 15)
.overlay(Circle().stroke(LK.ground, lineWidth: on ? 2 : 0).padding(-2))
.overlay(Circle().stroke(on ? c : Color.clear, lineWidth: 2).padding(-4))
.frame(width: 22, height: 22)
.contentShape(Rectangle())
}
.buttonStyle(.plain)
.help(help)
@@ -253,14 +258,13 @@ struct PMStatusBar: View {
var body: some View {
HStack(spacing: 12) {
if state.loadingMetadata { ProgressView().controlSize(.small) }
Text(summary).lineLimit(1).truncationMode(.middle)
Text(summary).lineLimit(1).truncationMode(.middle).foregroundStyle(LK.text2)
Spacer()
if state.lrPendingCount > 0 { Label("LR: \(state.lrPendingCount)", systemImage: "hourglass") }
if uploads.activeCount > 0 {
Label(uploads.rate > 0 ? "\(uploads.activeCount) Upload(s) · \(uploads.rateText)" : "\(uploads.activeCount) Upload(s) …",
systemImage: "arrow.up.circle.fill")
.foregroundStyle(Color.accentColor)
.monospacedDigit()
.foregroundStyle(LK.amber)
.onTapGesture { state.openWindow("tasks") }
}
if uploads.failedCount > 0 {
@@ -270,10 +274,12 @@ struct PMStatusBar: View {
}
if !state.statusText.isEmpty { Text(state.statusText).foregroundStyle(.secondary).lineLimit(1) }
}
.font(.system(size: 11))
.padding(.horizontal, 10)
.padding(.vertical, 4)
.background(.bar)
.font(LK.mono(11))
.foregroundStyle(LK.muted)
.padding(.horizontal, 20)
.frame(height: 30)
.background(LK.ground)
.overlay(alignment: .top) { Rectangle().fill(LK.border).frame(height: 1) }
}
/// "Ausgewählt 1 von 2189 (3,22 MB) | 2189 gesamt | /Users/…/datei.jpg" like PM.
@@ -340,19 +346,29 @@ struct PMSidebar: View {
.buttonStyle(.borderless).help("Aufgaben-Fenster (⌘⌥U)")
}
.frame(minHeight: 80, idealHeight: 150)
if state.matchdayActive {
panel("Spielerinnen") { MatchdayPlayerList() } accessory: {
if state.filter.person != nil || state.filter.team != nil || state.filter.withoutPlayer {
Button("Alle") { state.setTeamFilter(nil) }.buttonStyle(.borderless).font(.system(size: 11))
}
}
.frame(minHeight: 120, idealHeight: 260)
}
}
.background(LK.panel)
}
private func panel<C: View, A: View>(_ title: String, @ViewBuilder content: () -> C, @ViewBuilder accessory: () -> A) -> some View {
VStack(spacing: 0) {
HStack {
Text(title).font(.system(size: 12, weight: .semibold))
LKSectionLabel(title: title)
Spacer()
accessory()
}
.padding(.horizontal, 10)
.padding(.vertical, 5)
.background(Color.secondary.opacity(0.12))
.padding(.horizontal, 16)
.padding(.top, 14)
.padding(.bottom, 6)
content()
}
}
@@ -433,9 +449,12 @@ struct FolderTreeRow: View {
.fontWeight(state.folder == url ? .semibold : .regular)
Spacer()
}
.padding(.leading, CGFloat(depth) * 14 + 6)
.padding(.vertical, 2)
.background(state.folder == url ? Color.accentColor.opacity(0.25) : Color.clear)
.padding(.leading, CGFloat(depth) * 14 + 10)
.padding(.trailing, 8)
.padding(.vertical, 5)
.foregroundStyle(state.folder == url ? LK.amber : LK.text)
.background(RoundedRectangle(cornerRadius: 7).fill(state.folder == url ? LK.selected : Color.clear))
.padding(.horizontal, 8)
.contentShape(Rectangle())
.onTapGesture(count: 1) {
state.open(folder: url)