diff options
Diffstat (limited to 'DomainDig/DashboardView.swift')
| -rw-r--r-- | DomainDig/DashboardView.swift | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/DomainDig/DashboardView.swift b/DomainDig/DashboardView.swift index 087f080..398ff3e 100644 --- a/DomainDig/DashboardView.swift +++ b/DomainDig/DashboardView.swift @@ -239,22 +239,26 @@ struct DashboardView: View { let warningCount = states.filter { $0.health == .warning }.count let title: String let color: Color + let systemImage: String if criticalCount > 0 { title = "\(criticalCount) critical" color = .red + systemImage = "exclamationmark.octagon.fill" } else if warningCount > 0 { title = "\(warningCount) warning" color = .yellow + systemImage = "exclamationmark.triangle.fill" } else { title = "Healthy" color = .green + systemImage = "checkmark.circle.fill" } return AppStatusBadgeView( model: .init( title: title, - systemImage: criticalCount > 0 ? "exclamationmark.octagon.fill" : (warningCount > 0 ? "exclamationmark.triangle.fill" : "checkmark.circle.fill"), + systemImage: systemImage, foregroundColor: color, backgroundColor: color.opacity(0.16) ) |
