@@ -24,7 +24,6 @@ struct MinimedPumpSettingsView: View {
2424 var supportedInsulinTypes : [ InsulinType ]
2525
2626 @State private var showingDeletionSheet = false
27-
2827 @State private var showSyncTimeOptions = false ;
2928
3029 var handleRileyLinkSelection : ( RileyLinkDevice ) -> Void
@@ -47,7 +46,6 @@ struct MinimedPumpSettingsView: View {
4746 reservoirStatus
4847 }
4948 . padding ( . bottom, 5 )
50-
5149 }
5250
5351 if let basalDeliveryState = viewModel. basalDeliveryState {
@@ -64,51 +62,6 @@ struct MinimedPumpSettingsView: View {
6462 }
6563 }
6664
67- Section ( header: SectionHeader ( label: LocalizedString ( " Configuration " , comment: " The title of the configuration section in MinimedPumpManager settings " ) ) )
68- {
69- NavigationLink ( destination: InsulinTypeSetting ( initialValue: viewModel. pumpManager. state. insulinType, supportedInsulinTypes: supportedInsulinTypes, allowUnsetInsulinType: false , didChange: viewModel. didChangeInsulinType) ) {
70- HStack {
71- Text ( LocalizedString ( " Insulin Type " , comment: " Text for confidence reminders navigation link " ) ) . foregroundColor ( Color . primary)
72- if let currentTitle = viewModel. pumpManager. state. insulinType? . brandName {
73- Spacer ( )
74- Text ( currentTitle)
75- . foregroundColor ( . secondary)
76- }
77- }
78- }
79- NavigationLink ( destination: BatteryTypeSelectionView ( batteryType: $viewModel. batteryChemistryType) ) {
80- HStack {
81- Text ( LocalizedString ( " Pump Battery Type " , comment: " Text for medtronic pump battery type " ) ) . foregroundColor ( Color . primary)
82- Spacer ( )
83- Text ( viewModel. batteryChemistryType. description)
84- . foregroundColor ( . secondary)
85- }
86- }
87-
88- NavigationLink ( destination: DataSourceSelectionView ( batteryType: $viewModel. preferredDataSource) ) {
89- HStack {
90- Text ( LocalizedString ( " Preferred Data Source " , comment: " Text for medtronic pump preferred data source " ) ) . foregroundColor ( Color . primary)
91- Spacer ( )
92- Text ( viewModel. preferredDataSource. description)
93- . foregroundColor ( . secondary)
94- }
95- }
96-
97- if viewModel. pumpManager. state. pumpModel. hasMySentry {
98- NavigationLink ( destination: UseMySentrySelectionView ( mySentryConfig: $viewModel. mySentryConfig) ) {
99- HStack {
100- Text ( LocalizedString ( " Use MySentry " , comment: " Text for medtronic pump to use MySentry " ) ) . foregroundColor ( Color . primary)
101- Spacer ( )
102- Text ( ( viewModel. mySentryConfig == . useMySentry ?
103- LocalizedString ( " Yes " , comment: " Value string for MySentry config when MySentry is being used " ) :
104- LocalizedString ( " No " , comment: " Value string for MySentry config when MySentry is not being used " ) )
105- )
106- . foregroundColor ( . secondary)
107- }
108- }
109- }
110- }
111-
11265 Section ( header: HStack {
11366 Text ( LocalizedString ( " Devices " , comment: " Header for devices section of RileyLinkSetupView " ) )
11467 Spacer ( )
@@ -144,15 +97,32 @@ struct MinimedPumpSettingsView: View {
14497 rileyLinkListDataSource. isScanningEnabled = false
14598 }
14699
147-
148- Section ( ) {
100+ Section ( header: Text ( LocalizedString ( " Status " , comment: " The title of the status section in MinimedPumpManager settings " ) ) ) {
101+ if let timeSinceLastCannulaFill = viewModel. timeSinceLastSetChange {
102+ HStack {
103+ Text ( LocalizedString ( " Cannula Age " , comment: " Text for time since last medtronic pump set change event " ) )
104+ Spacer ( )
105+ Text ( timeSinceLastCannulaFill)
106+ . foregroundStyle ( . secondary)
107+ }
108+ }
109+ if let timeSinceLastRewind = viewModel. timeSinceLastRewind {
110+ HStack {
111+ Text ( LocalizedString ( " Insulin Age " , comment: " Text for time since last medtronic pump rewind event " ) )
112+ Spacer ( )
113+ Text ( timeSinceLastRewind)
114+ . foregroundStyle ( . secondary)
115+ }
116+ }
149117 HStack {
150- Text ( LocalizedString ( " Pump Battery Remaining " , comment: " Text for medtronic pump battery percent remaining " ) ) . foregroundColor ( Color . primary )
118+ Text ( LocalizedString ( " Pump Battery Remaining " , comment: " Text for medtronic pump battery percent remaining " ) )
151119 Spacer ( )
152120 if let chargeRemaining = viewModel. pumpManager. status. pumpBatteryChargeRemaining {
153121 Text ( String ( " \( Int ( round ( chargeRemaining * 100 ) ) ) % " ) )
122+ . foregroundStyle ( . secondary)
154123 } else {
155124 Text ( String ( LocalizedString ( " unknown " , comment: " Text to indicate battery percentage is unknown " ) ) )
125+ . foregroundStyle ( . secondary)
156126 }
157127 }
158128 HStack {
@@ -163,7 +133,7 @@ struct MinimedPumpSettingsView: View {
163133 . foregroundColor ( guidanceColors. warning)
164134 }
165135 TimeView ( timeZone: viewModel. pumpManager. status. timeZone)
166- . foregroundColor ( viewModel. isClockOffset ? guidanceColors. warning : nil )
136+ . foregroundColor ( viewModel. isClockOffset ? guidanceColors. warning : . secondary )
167137 }
168138 if viewModel. synchronizingTime {
169139 HStack {
@@ -184,8 +154,53 @@ struct MinimedPumpSettingsView: View {
184154 }
185155 }
186156
157+ Section ( header: Text ( LocalizedString ( " Configuration " , comment: " The title of the configuration section in MinimedPumpManager settings " ) ) )
158+ {
159+ NavigationLink ( destination: InsulinTypeSetting ( initialValue: viewModel. pumpManager. state. insulinType, supportedInsulinTypes: supportedInsulinTypes, allowUnsetInsulinType: false , didChange: viewModel. didChangeInsulinType) ) {
160+ HStack {
161+ Text ( LocalizedString ( " Insulin Type " , comment: " Text for confidence reminders navigation link " ) ) . foregroundColor ( Color . primary)
162+ if let currentTitle = viewModel. pumpManager. state. insulinType? . brandName {
163+ Spacer ( )
164+ Text ( currentTitle)
165+ . foregroundColor ( . secondary)
166+ }
167+ }
168+ }
169+ NavigationLink ( destination: BatteryTypeSelectionView ( batteryType: $viewModel. batteryChemistryType) ) {
170+ HStack {
171+ Text ( LocalizedString ( " Pump Battery Type " , comment: " Text for medtronic pump battery type " ) ) . foregroundColor ( Color . primary)
172+ Spacer ( )
173+ Text ( viewModel. batteryChemistryType. description)
174+ . foregroundColor ( . secondary)
175+ }
176+ }
187177
188- Section {
178+ NavigationLink ( destination: DataSourceSelectionView ( batteryType: $viewModel. preferredDataSource) ) {
179+ HStack {
180+ Text ( LocalizedString ( " Preferred Data Source " , comment: " Text for medtronic pump preferred data source " ) ) . foregroundColor ( Color . primary)
181+ Spacer ( )
182+ Text ( viewModel. preferredDataSource. description)
183+ . foregroundColor ( . secondary)
184+ }
185+ }
186+
187+ if viewModel. pumpManager. state. pumpModel. hasMySentry {
188+ NavigationLink ( destination: UseMySentrySelectionView ( mySentryConfig: $viewModel. mySentryConfig) ) {
189+ HStack {
190+ Text ( LocalizedString ( " Use MySentry " , comment: " Text for medtronic pump to use MySentry " ) ) . foregroundColor ( Color . primary)
191+ Spacer ( )
192+ Text ( ( viewModel. mySentryConfig == . useMySentry ?
193+ LocalizedString ( " Yes " , comment: " Value string for MySentry config when MySentry is being used " ) :
194+ LocalizedString ( " No " , comment: " Value string for MySentry config when MySentry is not being used " ) )
195+ )
196+ . foregroundColor ( . secondary)
197+ }
198+ }
199+ }
200+ }
201+
202+ Section ( header: Text ( LocalizedString ( " Details " , comment: " The title of the details section in MinimedPumpManager settings " ) ) )
203+ {
189204 LabeledValueView ( label: LocalizedString ( " Pump ID " , comment: " The title text for the pump ID config value " ) ,
190205 value: viewModel. pumpManager. state. pumpID)
191206 LabeledValueView ( label: LocalizedString ( " Firmware Version " , comment: " The title of the cell showing the pump firmware version " ) ,
@@ -194,7 +209,6 @@ struct MinimedPumpSettingsView: View {
194209 value: String ( describing: viewModel. pumpManager. state. pumpRegion) )
195210 }
196211
197-
198212 Section ( ) {
199213 deletePumpButton
200214 }
@@ -216,7 +230,6 @@ struct MinimedPumpSettingsView: View {
216230
217231 . insetGroupedListStyle ( )
218232 . navigationBarItems ( trailing: doneButton)
219- . navigationBarTitle ( String ( format: LocalizedString ( " Medtronic %1$@ " , comment: " Format string fof navigation bar title for MinimedPumpSettingsView (1: model number) " ) , viewModel. pumpManager. state. pumpModel. description) )
220233 }
221234
222235 var deliverySectionTitle : String {
@@ -371,7 +384,7 @@ struct MinimedPumpSettingsView: View {
371384 Image ( uiImage: viewModel. pumpImage)
372385 . resizable ( )
373386 . aspectRatio ( contentMode: ContentMode . fit)
374- . frame ( height: 150 )
387+ . frame ( height: 100 )
375388 . padding ( . horizontal)
376389 }
377390 . frame ( maxWidth: . infinity)
0 commit comments