summaryrefslogtreecommitdiff
path: root/DomainDig/BatchResultsView.swift
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-04-24 15:04:54 -0500
committerChristian Cleberg <[email protected]>2026-04-24 15:04:54 -0500
commit3f0b7746b1bee4c2f626eb805e3fd13c5f2f5d22 (patch)
tree17c710faf6191ac86ea5b6cab4df240cf2cefef9 /DomainDig/BatchResultsView.swift
parentd0b3b7a15b59266b4ae4262fdb0364245092c17c (diff)
downloaddomain-dig-3f0b7746b1bee4c2f626eb805e3fd13c5f2f5d22.tar.gz
domain-dig-3f0b7746b1bee4c2f626eb805e3fd13c5f2f5d22.tar.bz2
domain-dig-3f0b7746b1bee4c2f626eb805e3fd13c5f2f5d22.zip
DomainDig v3.8.0 — Smart Monitoring
* Stable domain intervals * Frequent changes decrease intervals * Duplicate states do not trigger alerts * Quiet hours suppress alerts * Quiet hours across midnight work correctly * Sensitivity levels alter behavior as expected
Diffstat (limited to 'DomainDig/BatchResultsView.swift')
-rw-r--r--DomainDig/BatchResultsView.swift28
1 files changed, 27 insertions, 1 deletions
diff --git a/DomainDig/BatchResultsView.swift b/DomainDig/BatchResultsView.swift
index c8dde42..e97899e 100644
--- a/DomainDig/BatchResultsView.swift
+++ b/DomainDig/BatchResultsView.swift
@@ -72,12 +72,25 @@ struct BatchResultRowView: View {
}
HStack(spacing: 10) {
- AppStatusBadgeView(model: AppStatusFactory.availability(result.availability))
+ AppStatusBadgeView(model: availabilityBadgeModel)
if let riskScore = result.riskScore, let riskLevel = result.riskLevel {
Text("Risk \(riskScore) \(riskLevel.title)")
+ .lineLimit(1)
+ .minimumScaleFactor(0.85)
}
+ }
+ .font(appDensity.font(.caption2))
+ .foregroundStyle(.secondary)
+
+ HStack(spacing: 10) {
Text(result.primaryIP ?? "No IP")
+ .lineLimit(1)
+ .truncationMode(.middle)
+
+ Spacer(minLength: 8)
+
Text(result.timestamp.formatted(date: .abbreviated, time: .shortened))
+ .lineLimit(1)
}
.font(appDensity.font(.caption2))
.foregroundStyle(.secondary)
@@ -116,6 +129,19 @@ struct BatchResultRowView: View {
}
}
+ private var availabilityBadgeModel: AppStatusBadgeModel {
+ guard result.status == .failed else {
+ return AppStatusFactory.availability(result.availability)
+ }
+
+ return .init(
+ title: availabilityText,
+ systemImage: "exclamationmark.circle",
+ foregroundColor: .secondary,
+ backgroundColor: Color(.systemGray5).opacity(0.55)
+ )
+ }
+
private var quickStatusBadge: AppStatusBadgeModel {
switch result.status {
case .pending: