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

+91 -30
View File
@@ -7,18 +7,28 @@ struct PreviewView: View {
@State private var fullResLoadedFor: String?
var body: some View {
ZStack(alignment: .bottom) {
Color.black
if let image {
ZoomableImageView(image: image, maxZoom: CGFloat(state.settings.maxZoom), request: state.zoomRequest) { mag, fit in
state.zoom100 = !fit
state.zoomPercent = Int((mag * 100).rounded())
if !fit { Task { await loadFullRes() } }
// Layout B: loupe · filmstrip · IPTC panel – in the Leuchttisch look
HStack(spacing: 0) {
VStack(spacing: 0) {
ZStack(alignment: .bottom) {
LK.deep
if let image {
ZoomableImageView(image: image, maxZoom: CGFloat(state.settings.maxZoom), request: state.zoomRequest) { mag, fit in
state.zoom100 = !fit
state.zoomPercent = Int((mag * 100).rounded())
if !fit { Task { await loadFullRes() } }
}
} else {
ProgressView()
}
if let item = state.cursorItem { infoBar(item) }
}
} else {
ProgressView()
Filmstrip()
}
if state.settings.loupePanel {
Divider().overlay(LK.border)
LoupeInspector().frame(width: 380)
}
if let item = state.cursorItem { infoBar(item) }
}
.task(id: state.cursorID) { await load() }
}
@@ -45,31 +55,82 @@ struct PreviewView: View {
}
private func infoBar(_ item: PhotoItem) -> some View {
HStack(spacing: 14) {
Image(systemName: item.tagged ? "checkmark.square.fill" : "square")
Text(item.filename).bold()
HStack(spacing: 1) {
ForEach(1...5, id: \.self) { n in Image(systemName: n <= item.rating ? "star.fill" : "star") }
}
.foregroundStyle(.yellow)
if let l = item.label { Circle().fill(l.color).frame(width: 10, height: 10) }
HStack(spacing: 12) {
Text([item.exif["FocalLength"], item.exif["FNumber"].map { "f/\($0)" },
item.exif["ExposureTime"].map { "\($0) s" }, item.exif["ISO"].map { "ISO \($0)" }]
.compactMap { $0 }.joined(separator: " "))
.font(LK.mono(12))
.foregroundStyle(LK.text2)
Spacer()
Text([item.exif["Model"], item.exif["LensModel"], item.exif["FocalLength"],
item.exif["ExposureTime"].map { "\($0) s" }, item.exif["FNumber"].map { "f/\($0)" },
item.exif["ISO"].map { "ISO \($0)" }].compactMap { $0 }.joined(separator: " · "))
.foregroundStyle(.secondary)
HStack(spacing: 4) {
HStack(spacing: 6) {
Button { state.zoom(.zoomOut) } label: { Image(systemName: "minus.magnifyingglass") }
Button { state.zoom(.fit) } label: { Text(state.zoom100 ? "\(state.zoomPercent) %" : "Einpassen").monospacedDigit().frame(minWidth: 70) }
.buttonStyle(LKButtonStyle(compact: true))
Button { state.zoom(.fit) } label: { Text(state.zoom100 ? "\(state.zoomPercent) %" : "Einpassen").font(LK.mono(12)) }
.buttonStyle(LKButtonStyle(compact: true))
.help("Einpassen (Z)")
Button { state.zoom(.actual) } label: { Text("100 %") }
Button { state.zoom(.actual) } label: { Text("100 %").font(LK.mono(12)) }
.buttonStyle(LKButtonStyle(compact: true))
Button { state.zoom(.zoomIn) } label: { Image(systemName: "plus.magnifyingglass") }
.buttonStyle(LKButtonStyle(compact: true))
Button { state.settings.loupePanel.toggle() } label: { Image(systemName: "sidebar.right") }
.buttonStyle(LKButtonStyle(compact: true))
.help("IPTC-Panel ein/aus")
}
.buttonStyle(.borderless)
}
.font(.callout)
.padding(.horizontal, 14)
.padding(.vertical, 8)
.background(.ultraThinMaterial)
.padding(.horizontal, 16)
.padding(.vertical, 10)
.background(LK.ground.opacity(0.85))
}
}
/// Filmstrip under the loupe (layout B): neighbours of the current image, click to jump.
struct Filmstrip: View {
@EnvironmentObject var state: AppState
var body: some View {
ScrollViewReader { proxy in
ScrollView(.horizontal, showsIndicators: false) {
LazyHStack(spacing: 8) {
ForEach(state.visible) { item in
FilmstripCell(item: item, url: state.previewURL(for: item), current: item.id == state.cursorID)
.equatable()
.id(item.id)
.onTapGesture { state.cursorID = item.id; state.selection = [item.id] }
}
}
.padding(.horizontal, 14)
.padding(.vertical, 12)
}
.frame(height: 104)
.background(LK.ground)
.overlay(alignment: .top) { Rectangle().fill(LK.border).frame(height: 1) }
.onChange(of: state.cursorID) { _, id in if let id { withAnimation(.easeOut(duration: 0.15)) { proxy.scrollTo(id, anchor: .center) } } }
.onAppear { if let id = state.cursorID { proxy.scrollTo(id, anchor: .center) } }
}
}
}
struct FilmstripCell: View, Equatable {
let item: PhotoItem
let url: URL
let current: Bool
@State private var image: NSImage?
static func == (a: FilmstripCell, b: FilmstripCell) -> Bool { a.item == b.item && a.url == b.url && a.current == b.current }
var body: some View {
ZStack(alignment: .leading) {
Rectangle().fill(LK.deep)
if let image { Image(nsImage: image).resizable().scaledToFill() }
Rectangle().fill(item.label?.lkColor ?? .clear).frame(width: 4)
}
.frame(width: 118, height: 78)
.clipShape(RoundedRectangle(cornerRadius: 6))
.overlay(RoundedRectangle(cornerRadius: 6).stroke(current ? LK.amber : Color.clear, lineWidth: 2))
.opacity(current ? 1 : 0.72)
.task(id: url) {
image = ImageLoader.shared.cachedThumbnail(url)
if image == nil { image = await ImageLoader.shared.thumbnail(for: url) }
}
}
}