Remove Test Connection from source editing

The Test Connection buttons only probed API/server reachability, which
was misleading: a green result said nothing about whether videos would
actually play. Remove both the remote-server and WebDAV bandwidth test
buttons and all code exclusive to them (testBandwidth, BandwidthTestResult,
and orphaned localization keys). Add-time connectivity validation for
SMB/WebDAV sources is retained.
This commit is contained in:
Arkadiusz Fal
2026-05-19 20:40:28 +02:00
parent 858011c507
commit 88fafc5ada
6 changed files with 0 additions and 781 deletions

View File

@@ -11,8 +11,6 @@ import SwiftUI
/// Result of a connection test for WebDAV/SMB sources.
enum SourceTestResult {
case success
case successWithBandwidth(BandwidthTestResult)
case failure(String)
}
@@ -25,38 +23,6 @@ struct SourceTestResultSection: View {
var body: some View {
Section {
switch result {
case .success:
Label(String(localized: "sources.status.connected"), systemImage: "checkmark.circle.fill")
.foregroundStyle(.green)
case .successWithBandwidth(let bandwidth):
VStack(alignment: .leading, spacing: 4) {
Label(String(localized: "sources.status.connected"), systemImage: "checkmark.circle.fill")
.foregroundStyle(.green)
if bandwidth.hasWriteAccess {
if let upload = bandwidth.formattedUploadSpeed {
Label(String(localized: "sources.bandwidth.upload \(upload)"), systemImage: "arrow.up.circle")
.font(.subheadline)
.foregroundStyle(.secondary)
}
}
if let download = bandwidth.formattedDownloadSpeed {
Label(String(localized: "sources.bandwidth.download \(download)"), systemImage: "arrow.down.circle")
.font(.subheadline)
.foregroundStyle(.secondary)
}
if !bandwidth.hasWriteAccess {
Label(String(localized: "sources.status.readOnly"), systemImage: "lock.fill")
.font(.subheadline)
.foregroundStyle(.orange)
}
if let warning = bandwidth.warning {
Text(warning)
.font(.caption)
.foregroundStyle(.secondary)
}
}
case .failure(let error):
Label(error, systemImage: "xmark.circle.fill")
.foregroundStyle(.red)