Live-Upload-Rate (MB/s, Mbit/s, Restzeit) für FTP (curl-Fortschritt) und Immich, Fortschritt pro Datei

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 01:00:35 +00:00
1 parent 2bf0d851aa
commit 5505fa1f37
5 files changed
+198 -12

No files matched your search

+13 -1
View File
@@ -98,7 +98,9 @@ struct MainToolbar: ToolbarContent {
}
.help("In Lightroom Classic bearbeiten (⌘E)")
Button { state.openWindow("upload") } label: {
Label(uploads.activeCount > 0 ? "Upload (\(uploads.activeCount))" : "Upload", systemImage: "icloud.and.arrow.up")
Label(uploads.activeCount > 0
? (uploads.rate > 0 ? "\(ByteCountFormatter.string(fromByteCount: Int64(uploads.rate), countStyle: .file))/s" : "Upload (\(uploads.activeCount))")
: "Upload", systemImage: "icloud.and.arrow.up")
}
.help("Upload-Fenster (⌘U)")
Button { state.openWindow("tasks") } label: {
@@ -247,6 +249,13 @@ struct PMStatusBar: View {
Text(summary).lineLimit(1).truncationMode(.middle)
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()
.onTapGesture { state.openWindow("tasks") }
}
if uploads.failedCount > 0 {
Label("\(uploads.failedCount) Upload(s) fehlgeschlagen", systemImage: "exclamationmark.triangle.fill")
.foregroundStyle(.red)
@@ -377,6 +386,9 @@ struct MiniTaskRow: View {
}
if task.isRunning {
if task.total > 0 { ProgressView(value: task.progress).controlSize(.small) } else { ProgressView().controlSize(.small) }
if !task.detail.isEmpty {
Text(task.detail).font(.caption2.monospacedDigit()).foregroundStyle(.secondary).lineLimit(1)
}
} else {
Text(task.detail).font(.caption2).foregroundStyle(.secondary).lineLimit(1)
}
@@ -22,12 +22,25 @@ struct TasksWindow: View {
TableColumn("Als") { j in Text(j.remoteName).foregroundStyle(.secondary) }
TableColumn("Ziel") { j in Text(j.targetName) }
TableColumn("Status") { j in UploadStatusView(status: j.status) }
TableColumn("Fortschritt") { j in
if j.status == .running {
HStack {
ProgressView(value: j.progress).frame(width: 90)
Text("\(Int(j.progress * 100)) %").monospacedDigit().font(.caption)
}
} else {
Text(ByteCountFormatter.string(fromByteCount: j.fileSize, countStyle: .file)).foregroundStyle(.secondary)
}
}
}
.frame(minHeight: 180)
}
Divider()
HStack {
Toggle("Einzelne Upload-Dateien", isOn: $showFiles).toggleStyle(.checkbox)
if uploads.rate > 0 {
Label(uploads.rateText, systemImage: "speedometer").monospacedDigit().foregroundStyle(Color.accentColor)
}
Spacer()
Button("Fehlgeschlagene Uploads wiederholen") { uploads.retryFailed() }.disabled(uploads.failedCount == 0)
Button("Erledigte entfernen") { tasks.clearFinished(); uploads.clearFinished() }