@@ -12,11 +12,10 @@ import LoopUI
1212import SwiftUI
1313import WidgetKit
1414
15- struct SystemStatusWidgetEntryView : View {
16-
15+ struct SystemStatusWidgetEntryView : View {
1716 @Environment ( \. widgetFamily) private var widgetFamily
1817
19- var entry : StatusWidgetTimelineProvider . Entry
18+ var entry : StatusWidgetTimelimeEntry
2019
2120 var freshness : LoopCompletionFreshness {
2221 let lastLoopCompleted = entry. lastLoopCompleted ?? Date ( ) . addingTimeInterval ( . minutes( 16 ) )
@@ -38,10 +37,7 @@ struct SystemStatusWidgetEntryView : View {
3837 }
3938 . frame ( maxWidth: . infinity, maxHeight: . infinity, alignment: . center)
4039 . padding ( 5 )
41- . background (
42- ContainerRelativeShape ( )
43- . fill ( Color ( " WidgetSecondaryBackground " ) )
44- )
40+ . containerRelativeBackground ( )
4541
4642 HStack ( alignment: . center, spacing: 0 ) {
4743 PumpView ( entry: entry)
@@ -52,33 +48,30 @@ struct SystemStatusWidgetEntryView : View {
5248 }
5349 . frame ( maxHeight: . infinity, alignment: . center)
5450 . padding ( . vertical, 5 )
55- . background (
56- ContainerRelativeShape ( )
57- . fill ( Color ( " WidgetSecondaryBackground " ) )
58- )
51+ . containerRelativeBackground ( )
5952 }
6053
6154 if widgetFamily != . systemSmall {
6255 VStack ( alignment: . center, spacing: 5 ) {
6356 HStack ( alignment: . center, spacing: 5 ) {
64- SystemActionLink ( to : . carbEntry)
57+ DeeplinkView ( destination : . carbEntry)
6558
66- SystemActionLink ( to : . bolus)
59+ DeeplinkView ( destination : . bolus)
6760 }
6861
6962 HStack ( alignment: . center, spacing: 5 ) {
7063 if entry. preMealPresetAllowed {
71- SystemActionLink ( to : . preMeal, active : entry. preMealPresetActive)
64+ DeeplinkView ( destination : . preMeal, isActive : entry. preMealPresetActive)
7265 }
7366
74- SystemActionLink ( to : . customPreset , active : entry. customPresetActive)
67+ DeeplinkView ( destination : . customPresets , isActive : entry. customPresetActive)
7568 }
7669 }
7770 . buttonStyle ( . plain)
7871 . frame ( maxWidth: . infinity, maxHeight: . infinity, alignment: . center)
7972 }
8073 }
81- . foregroundColor ( entry. contextIsStale ? Color ( UIColor . systemGray3 ) : nil )
74+ . foregroundColor ( entry. contextIsStale ? . staleGray : nil )
8275 . padding ( 5 )
8376 . widgetBackground ( )
8477 }
0 commit comments