Files
Firelink/Sources/Firelink/Settings/EngineSettingsPane.swift
T
nimbold 2b820ec802 feat: modernize settings and add SOCKS5 support
- Split monolithic SettingsView.swift into modular Settings panes
- Add SOCKS5 proxy support to proxy configuration
- Fix ListRowDensity application in DownloadTable
- Improve discoverability of global speed limit by adding it to Downloads pane
2026-06-05 03:02:29 +03:30

47 lines
1.5 KiB
Swift

import SwiftUI
import AppKit
struct EngineSettingsPane: View {
@State private var version = "Checking..."
private var executableURL: URL? {
Aria2DownloadEngine.findExecutable()
}
var body: some View {
Form {
Section {
LabeledContent("Status") {
Label(
executableURL == nil ? "Missing" : "Ready",
systemImage: executableURL == nil ? "exclamationmark.triangle.fill" : "checkmark.seal.fill"
)
.foregroundStyle(executableURL == nil ? .orange : .green)
}
LabeledContent("Binary") {
Text(executableURL?.path ?? "Not found")
.font(.system(.body, design: .monospaced))
.textSelection(.enabled)
}
LabeledContent("Version") {
Text(version)
.font(.system(.body, design: .monospaced))
.textSelection(.enabled)
}
if executableURL == nil {
Text("Install aria2 with Homebrew or bundle aria2c inside the app resources.")
.font(.caption)
.foregroundStyle(.secondary)
}
}
}
.formStyle(.grouped)
.task {
version = await Aria2DownloadEngine.versionString() ?? "Unavailable"
}
}
}