chore: remove update logs UI from preferences

Remove the Show/Hide Logs button and logs view from the Updates preferences
tab. Keep the logging infrastructure in SparkleUpdater for diagnostics,
but don't display it in the UI.
This commit is contained in:
Micha
2025-12-30 19:27:06 +01:00
parent 5dc5621871
commit b7f5d1a762
2 changed files with 0 additions and 54 deletions

View File

@@ -257,64 +257,11 @@ private struct UpdatesPreferencesView: View {
.foregroundColor(.secondary)
.padding(.top, 4)
Divider()
.padding(.vertical, 8)
Button(action: { sparkleUpdater.showLogs.toggle() }) {
Label(sparkleUpdater.showLogs ? "Hide Logs" : "Show Logs", systemImage: "terminal.fill")
}
if sparkleUpdater.showLogs {
logsView
}
Spacer()
}
.toggleStyle(.switch)
.frame(maxWidth: .infinity, alignment: .leading)
}
private var logsView: some View {
VStack(alignment: .leading, spacing: 8) {
Text("Update Logs")
.font(.caption)
.fontWeight(.semibold)
.foregroundColor(.secondary)
ScrollView {
VStack(alignment: .leading, spacing: 4) {
if sparkleUpdater.logMessages.isEmpty {
Text("No logs yet. Check for updates to see activity.")
.font(.caption)
.foregroundColor(.secondary)
.italic()
} else {
ForEach(sparkleUpdater.logMessages, id: \.self) { message in
Text(message)
.font(.caption)
.foregroundColor(.secondary)
.lineLimit(3)
.textSelection(.enabled)
}
}
}
.frame(maxWidth: .infinity, alignment: .leading)
.padding(8)
}
.frame(height: 200)
.background(Color(nsColor: .controlBackgroundColor))
.cornerRadius(6)
.border(.separator, width: 1)
Button(action: {
sparkleUpdater.logMessages.removeAll()
}) {
Label("Clear Logs", systemImage: "trash")
.font(.caption)
}
.disabled(sparkleUpdater.logMessages.isEmpty)
}
}
}
private struct NotificationsPreferencesView: View {