Use a warning color (orange) for numbers that indicate that cleanup is needed.

This commit is contained in:
Brent Simmons committed 2026-03-25 11:36:53 -07:00
1 parent 4a814741b4
commit a969bbb1d8
2 files changed
+11

No files matched your search

@@ -22,6 +22,7 @@ enum CloudKitStatsLayout {
static let fetchingAlpha: CGFloat = 0.4
static let animationDuration: CGFloat = 0.25
static let starColor = Assets.Colors.star
static let warningColor = NSColor.systemOrange
@MainActor static func makeDivider() -> NSView {
let divider = NSBox()
@@ -147,6 +147,16 @@ private extension CloudKitStatsScanViewController {
let statusSectionDone = !isFetching || stats.articleCount > 0
contentView.statusSectionView.animator().alphaValue = statusSectionDone ? 1.0 : CloudKitStatsLayout.fetchingAlpha
contentView.articleSectionView.animator().alphaValue = isFetching ? CloudKitStatsLayout.fetchingAlpha : 1.0
let syncUnreadContent = UserDefaults.standard.bool(forKey: Account.iCloudSyncArticleContentForUnreadArticlesKey)
updateWarningColor(contentView.staleCountLabel, count: stats.staleStatusCount)
updateWarningColor(contentView.unreadContentCountLabel, count: syncUnreadContent ? 0 : stats.unreadArticleCount)
updateWarningColor(contentView.readContentCountLabel, count: stats.readArticleCount)
updateWarningColor(contentView.orphanedContentCountLabel, count: stats.orphanedArticleCount)
}
func updateWarningColor(_ label: NSTextField, count: Int) {
label.textColor = count > 0 ? CloudKitStatsLayout.warningColor : .labelColor
}
func showErrorAlertIfNeeded() {