Design-Fixes: Einstellungen nicht mehr abgeschnitten (gruppierte Formulare, warme Zeilen), Ingest-Kartenliste als Karten mit Leerzustand, Upload-Fenster neu (Ziel-Karten, Optionen, Zusammenfassung)

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 16:49:48 +00:00
1 parent 54f5742a60
commit 22b2611228
4 files changed
+245 -76

No files matched your search

+73 -17
View File
@@ -40,21 +40,24 @@ struct IngestView: View {
}
pathPreview
HStack {
Button("Variablen …") { state.openWindow("codes") }
Button("Variablen …") { state.openWindow("codes") }.buttonStyle(LKButtonStyle())
Spacer()
Button("Abbrechen") { state.pendingIngestSources = []; dismiss() }.keyboardShortcut(.cancelAction)
Button("Abbrechen") { state.pendingIngestSources = []; dismiss() }
.buttonStyle(LKButtonStyle())
.keyboardShortcut(.cancelAction)
Button("Ingest") {
state.startIngest(sources: sources, fromCards: mode == .disks)
state.pendingIngestSources = []
dismiss()
}
.keyboardShortcut(.defaultAction)
.buttonStyle(.borderedProminent)
.buttonStyle(LKButtonStyle(primary: true))
.disabled(sources.isEmpty || state.settings.ingest.primaryDestination.isEmpty || state.ingestRunning)
}
}
.padding(18)
.frame(width: 980)
.background(LK.ground)
.onAppear(perform: setup)
}
@@ -72,26 +75,33 @@ struct IngestView: View {
switch mode {
case .disks:
List(cards, selection: $selectedCards) { c in
HStack {
Image(systemName: "sdcard")
Text(c.name)
Spacer()
Text(c.used).foregroundStyle(.secondary)
}
.tag(c.dcim)
}.scrollContentBackground(.hidden).background(LK.deep)
.frame(height: 150)
cardList
HStack {
Button("Neu suchen") { rescan() }
Button("Neu suchen") { rescan() }.buttonStyle(LKButtonStyle(compact: true))
Button("Auswerfen") {
for c in cards where selectedCards.contains(c.dcim) { try? NSWorkspace.shared.unmountAndEjectDevice(at: c.volume) }
rescan()
}
.buttonStyle(LKButtonStyle(compact: true))
.disabled(selectedCards.isEmpty)
}
case .folders:
List(folders, id: \.self) { Text($0.path).lineLimit(1).truncationMode(.middle) }.scrollContentBackground(.hidden).background(LK.deep).frame(height: 150)
VStack(alignment: .leading, spacing: 6) {
if folders.isEmpty {
emptyBox(icon: "folder.badge.plus", text: "Noch keine Ordner – „Ordner hinzufügen …“")
}
ForEach(folders, id: \.self) { f in
HStack {
Image(systemName: "folder.fill").foregroundStyle(LK.amber)
Text(f.path).font(LK.mono(12)).lineLimit(1).truncationMode(.middle)
Spacer()
Button { folders.removeAll { $0 == f } } label: { Image(systemName: "xmark") }.buttonStyle(.plain).foregroundStyle(LK.muted)
}
.padding(10)
.background(RoundedRectangle(cornerRadius: 9).fill(LK.raised))
}
}
.frame(minHeight: 150, alignment: .top)
HStack {
Button("Ordner hinzufügen …") { pickFolders() }
Button("Leeren") { folders = [] }.disabled(folders.isEmpty)
@@ -131,13 +141,13 @@ struct IngestView: View {
GroupBox("Zielordner") {
VStack(alignment: .leading, spacing: 6) {
HStack {
Text("Primär:").frame(width: 80, alignment: .leading)
Text("Primär:").frame(width: 96, alignment: .leading)
Button("Primäres Ziel …") { pick(ingest.primaryDestination) }
}
Text(state.settings.ingest.primaryDestination.isEmpty ? "–" : state.settings.ingest.primaryDestination)
.font(.caption).foregroundStyle(.secondary).lineLimit(1).truncationMode(.middle)
HStack {
Toggle("Sekundär:", isOn: ingest.secondaryEnabled).frame(width: 80, alignment: .leading)
Toggle("Sekundär:", isOn: ingest.secondaryEnabled).fixedSize()
Button("Sekundäres Ziel …") { pick(ingest.backupDestination) }
.disabled(!state.settings.ingest.secondaryEnabled)
}
@@ -217,6 +227,52 @@ struct IngestView: View {
// MARK: Helpers
/// Memory cards as selectable rows (instead of a black system list).
@ViewBuilder
private var cardList: some View {
VStack(alignment: .leading, spacing: 6) {
if cards.isEmpty {
emptyBox(icon: "sdcard", text: "Keine Speicherkarte gefunden – Karte einstecken oder „Neu suchen“")
}
ForEach(cards) { c in
let on = selectedCards.contains(c.dcim)
Button {
if on { selectedCards.remove(c.dcim) } else { selectedCards.insert(c.dcim) }
} label: {
HStack(spacing: 12) {
Image(systemName: "sdcard.fill")
.font(.system(size: 16))
.foregroundStyle(on ? LK.onAmber : LK.text2)
.frame(width: 32, height: 32)
.background(RoundedRectangle(cornerRadius: 8).fill(on ? LK.amber : LK.deep))
VStack(alignment: .leading, spacing: 2) {
Text(c.name).font(.system(size: 14, weight: .bold)).foregroundStyle(LK.text)
Text(c.used).font(LK.mono(11)).foregroundStyle(LK.muted)
}
Spacer()
Image(systemName: on ? "checkmark.circle.fill" : "circle")
.font(.system(size: 18)).foregroundStyle(on ? LK.amber : LK.faint)
}
.padding(10)
.background(RoundedRectangle(cornerRadius: 10).fill(on ? LK.selected : LK.raised))
.overlay(RoundedRectangle(cornerRadius: 10).stroke(on ? LK.amber : LK.border, lineWidth: on ? 2 : 1))
.contentShape(Rectangle())
}
.buttonStyle(.plain)
}
}
.frame(minHeight: 150, alignment: .top)
}
private func emptyBox(icon: String, text: String) -> some View {
VStack(spacing: 10) {
Image(systemName: icon).font(.system(size: 28)).foregroundStyle(LK.faint)
Text(text).font(.system(size: 12)).foregroundStyle(LK.muted).multilineTextAlignment(.center)
}
.frame(maxWidth: .infinity, minHeight: 140)
.background(RoundedRectangle(cornerRadius: 10).strokeBorder(LK.borderStrong, style: StrokeStyle(lineWidth: 1, dash: [5, 4])))
}
private func setup() {
rescan()
if !state.pendingIngestSources.isEmpty {