summaryrefslogtreecommitdiff
path: root/Hutch/Views
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-04-12 00:55:42 -0500
committerChristian Cleberg <[email protected]>2026-04-12 00:55:42 -0500
commit9050405b4f33b2b9b70458fcf3e43b80c940eef7 (patch)
tree983c3a07a560258059cfe421beb3ffcf3c18baf4 /Hutch/Views
parent5f6d545eb3455a9e4da5a3cb4460811e3a48d939 (diff)
downloadhutch-2.15.0.tar.gz
hutch-2.15.0.tar.bz2
hutch-2.15.0.zip
add shortcuts widgets and power-user workflowsv2.15.0
Diffstat (limited to 'Hutch/Views')
-rw-r--r--Hutch/Views/Home/HomeViewModel.swift22
1 files changed, 22 insertions, 0 deletions
diff --git a/Hutch/Views/Home/HomeViewModel.swift b/Hutch/Views/Home/HomeViewModel.swift
index 8762393..ec2b324 100644
--- a/Hutch/Views/Home/HomeViewModel.swift
+++ b/Hutch/Views/Home/HomeViewModel.swift
@@ -388,6 +388,7 @@ final class HomeViewModel {
}
isLoadingSystemStatus = false
persistNeedsAttentionSnapshot()
+ persistSystemStatusWidgetSnapshot()
}
var hasDashboardContent: Bool {
@@ -928,6 +929,27 @@ final class HomeViewModel {
)
}
+ private func persistSystemStatusWidgetSnapshot() {
+ guard let snapshot = systemStatusSnapshot else {
+ return
+ }
+ let widgetSnapshot = SystemStatusWidgetSnapshot(
+ services: snapshot.services.map { service in
+ SystemStatusWidgetSnapshot.ServiceEntry(
+ id: service.id,
+ name: service.name,
+ status: service.status.displayName,
+ requiresAttention: service.status.requiresAttention
+ )
+ },
+ hasDisruption: snapshot.hasDisruption,
+ overallStatusText: snapshot.overallStatusText,
+ bannerSummary: snapshot.bannerSummary,
+ updatedAt: .now
+ )
+ SystemStatusWidgetSnapshotStore.save(widgetSnapshot)
+ }
+
nonisolated static func buildItems(from jobs: [HomeJobPayload]) -> [HomeBuildItem] {
jobs.map { job in
let repository = primaryRepositoryReference(in: job.manifest)