HomeRootView.swift 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639
  1. import CoreData
  2. import SpriteKit
  3. import SwiftDate
  4. import SwiftUI
  5. import Swinject
  6. extension Home {
  7. struct RootView: BaseView {
  8. let resolver: Resolver
  9. @StateObject var state = StateModel()
  10. @State var isStatusPopupPresented = false
  11. @State var showCancelAlert = false
  12. @Environment(\.managedObjectContext) var moc
  13. @Environment(\.colorScheme) var colorScheme
  14. @FetchRequest(
  15. entity: Override.entity(),
  16. sortDescriptors: [NSSortDescriptor(key: "date", ascending: false)]
  17. ) var fetchedPercent: FetchedResults<Override>
  18. @FetchRequest(
  19. entity: OverridePresets.entity(),
  20. sortDescriptors: [NSSortDescriptor(key: "name", ascending: true)], predicate: NSPredicate(
  21. format: "name != %@", "" as String
  22. )
  23. ) var fetchedProfiles: FetchedResults<OverridePresets>
  24. @FetchRequest(
  25. entity: TempTargets.entity(),
  26. sortDescriptors: [NSSortDescriptor(key: "date", ascending: false)]
  27. ) var sliderTTpresets: FetchedResults<TempTargets>
  28. @FetchRequest(
  29. entity: TempTargetsSlider.entity(),
  30. sortDescriptors: [NSSortDescriptor(key: "date", ascending: false)]
  31. ) var enactedSliderTT: FetchedResults<TempTargetsSlider>
  32. private var numberFormatter: NumberFormatter {
  33. let formatter = NumberFormatter()
  34. formatter.numberStyle = .decimal
  35. formatter.maximumFractionDigits = 2
  36. return formatter
  37. }
  38. private var fetchedTargetFormatter: NumberFormatter {
  39. let formatter = NumberFormatter()
  40. formatter.numberStyle = .decimal
  41. if state.units == .mmolL {
  42. formatter.maximumFractionDigits = 1
  43. } else { formatter.maximumFractionDigits = 0 }
  44. return formatter
  45. }
  46. private var targetFormatter: NumberFormatter {
  47. let formatter = NumberFormatter()
  48. formatter.numberStyle = .decimal
  49. formatter.maximumFractionDigits = 1
  50. return formatter
  51. }
  52. private var tirFormatter: NumberFormatter {
  53. let formatter = NumberFormatter()
  54. formatter.numberStyle = .decimal
  55. formatter.maximumFractionDigits = 0
  56. return formatter
  57. }
  58. private var dateFormatter: DateFormatter {
  59. let dateFormatter = DateFormatter()
  60. dateFormatter.timeStyle = .short
  61. return dateFormatter
  62. }
  63. private var spriteScene: SKScene {
  64. let scene = SnowScene()
  65. scene.scaleMode = .resizeFill
  66. scene.backgroundColor = .clear
  67. return scene
  68. }
  69. @ViewBuilder func header(_ geo: GeometryProxy) -> some View {
  70. HStack(alignment: .bottom) {
  71. Spacer()
  72. cobIobView
  73. Spacer()
  74. glucoseView
  75. Spacer()
  76. pumpView
  77. Spacer()
  78. loopView
  79. Spacer()
  80. }
  81. .frame(maxWidth: .infinity)
  82. .padding(.top, 10 + geo.safeAreaInsets.top)
  83. .padding(.bottom, 10)
  84. .background(Color.gray.opacity(0.3))
  85. }
  86. var cobIobView: some View {
  87. VStack(alignment: .leading, spacing: 12) {
  88. HStack {
  89. Text("IOB").font(.footnote).foregroundColor(.secondary)
  90. Text(
  91. (numberFormatter.string(from: (state.suggestion?.iob ?? 0) as NSNumber) ?? "0") +
  92. NSLocalizedString(" U", comment: "Insulin unit")
  93. )
  94. .font(.footnote).fontWeight(.bold)
  95. }.frame(alignment: .top)
  96. HStack {
  97. Text("COB").font(.footnote).foregroundColor(.secondary)
  98. Text(
  99. (numberFormatter.string(from: (state.suggestion?.cob ?? 0) as NSNumber) ?? "0") +
  100. NSLocalizedString(" g", comment: "gram of carbs")
  101. )
  102. .font(.footnote).fontWeight(.bold)
  103. }.frame(alignment: .bottom)
  104. }
  105. }
  106. var glucoseView: some View {
  107. CurrentGlucoseView(
  108. recentGlucose: $state.recentGlucose,
  109. timerDate: $state.timerDate,
  110. delta: $state.glucoseDelta,
  111. units: $state.units,
  112. alarm: $state.alarm,
  113. lowGlucose: $state.lowGlucose,
  114. highGlucose: $state.highGlucose
  115. )
  116. .onTapGesture {
  117. if state.alarm == nil {
  118. state.openCGM()
  119. } else {
  120. state.showModal(for: .snooze)
  121. }
  122. }
  123. .onLongPressGesture {
  124. let impactHeavy = UIImpactFeedbackGenerator(style: .heavy)
  125. impactHeavy.impactOccurred()
  126. if state.alarm == nil {
  127. state.showModal(for: .snooze)
  128. } else {
  129. state.openCGM()
  130. }
  131. }
  132. }
  133. var pumpView: some View {
  134. PumpView(
  135. reservoir: $state.reservoir,
  136. battery: $state.battery,
  137. name: $state.pumpName,
  138. expiresAtDate: $state.pumpExpiresAtDate,
  139. timerDate: $state.timerDate,
  140. timeZone: $state.timeZone
  141. )
  142. .onTapGesture {
  143. if state.pumpDisplayState != nil {
  144. state.setupPump = true
  145. }
  146. }
  147. }
  148. var loopView: some View {
  149. LoopView(
  150. suggestion: $state.suggestion,
  151. enactedSuggestion: $state.enactedSuggestion,
  152. closedLoop: $state.closedLoop,
  153. timerDate: $state.timerDate,
  154. isLooping: $state.isLooping,
  155. lastLoopDate: $state.lastLoopDate,
  156. manualTempBasal: $state.manualTempBasal
  157. ).onTapGesture {
  158. isStatusPopupPresented = true
  159. }.onLongPressGesture {
  160. let impactHeavy = UIImpactFeedbackGenerator(style: .heavy)
  161. impactHeavy.impactOccurred()
  162. state.runLoop()
  163. }
  164. }
  165. var tempBasalString: String? {
  166. guard let tempRate = state.tempRate else {
  167. return nil
  168. }
  169. let rateString = numberFormatter.string(from: tempRate as NSNumber) ?? "0"
  170. var manualBasalString = ""
  171. if state.apsManager.isManualTempBasal {
  172. manualBasalString = NSLocalizedString(
  173. " - Manual Basal ⚠️",
  174. comment: "Manual Temp basal"
  175. )
  176. }
  177. return rateString + NSLocalizedString(" U/hr", comment: "Unit per hour with space") + manualBasalString
  178. }
  179. var tempTargetString: String? {
  180. guard let tempTarget = state.tempTarget else {
  181. return nil
  182. }
  183. let target = tempTarget.targetBottom ?? 0
  184. let unitString = targetFormatter.string(from: (tempTarget.targetBottom?.asMmolL ?? 0) as NSNumber) ?? ""
  185. let rawString = (tirFormatter.string(from: (tempTarget.targetBottom ?? 0) as NSNumber) ?? "") + " " + state.units
  186. .rawValue
  187. var string = ""
  188. if sliderTTpresets.first?.active ?? false {
  189. let hbt = sliderTTpresets.first?.hbt ?? 0
  190. string = ", " + (tirFormatter.string(from: state.infoPanelTTPercentage(hbt, target) as NSNumber) ?? "") + " %"
  191. }
  192. let percentString = state
  193. .units == .mmolL ? (unitString + " mmol/L" + string) : (rawString + (string == "0" ? "" : string))
  194. return tempTarget.displayName + " " + percentString
  195. }
  196. var overrideString: String? {
  197. guard fetchedPercent.first?.enabled ?? false else {
  198. return nil
  199. }
  200. var percentString = "\((fetchedPercent.first?.percentage ?? 100).formatted(.number)) %"
  201. var target = (fetchedPercent.first?.target ?? 100) as Decimal
  202. let indefinite = (fetchedPercent.first?.indefinite ?? false)
  203. let unit = state.units.rawValue
  204. if state.units == .mmolL {
  205. target = target.asMmolL
  206. }
  207. var targetString = (fetchedTargetFormatter.string(from: target as NSNumber) ?? "") + " " + unit
  208. if tempTargetString != nil || target == 0 { targetString = "" }
  209. percentString = percentString == "100 %" ? "" : percentString
  210. let duration = (fetchedPercent.first?.duration ?? 0) as Decimal
  211. let addedMinutes = Int(duration)
  212. let date = fetchedPercent.first?.date ?? Date()
  213. var newDuration: Decimal = 0
  214. if date.addingTimeInterval(addedMinutes.minutes.timeInterval) > Date() {
  215. newDuration = Decimal(Date().distance(to: date.addingTimeInterval(addedMinutes.minutes.timeInterval)).minutes)
  216. }
  217. var durationString = indefinite ?
  218. "" : newDuration >= 1 ?
  219. (newDuration.formatted(.number.grouping(.never).rounded().precision(.fractionLength(0))) + " min") :
  220. (
  221. newDuration > 0 ? (
  222. (newDuration * 60).formatted(.number.grouping(.never).rounded().precision(.fractionLength(0))) + " s"
  223. ) :
  224. ""
  225. )
  226. let smbToggleString = (fetchedPercent.first?.smbIsOff ?? false) ? " \u{20e0}" : ""
  227. var comma1 = ", "
  228. var comma2 = comma1
  229. var comma3 = comma1
  230. if targetString == "" || percentString == "" { comma1 = "" }
  231. if durationString == "" { comma2 = "" }
  232. if smbToggleString == "" { comma3 = "" }
  233. if percentString == "", targetString == "" {
  234. comma1 = ""
  235. comma2 = ""
  236. }
  237. if percentString == "", targetString == "", smbToggleString == "" {
  238. durationString = ""
  239. comma1 = ""
  240. comma2 = ""
  241. comma3 = ""
  242. }
  243. if durationString == "" {
  244. comma2 = ""
  245. }
  246. if smbToggleString == "" {
  247. comma3 = ""
  248. }
  249. if durationString == "", !indefinite {
  250. return nil
  251. }
  252. return percentString + comma1 + targetString + comma2 + durationString + comma3 + smbToggleString
  253. }
  254. var infoPanel: some View {
  255. HStack(alignment: .center) {
  256. if state.pumpSuspended {
  257. Text("Pump suspended")
  258. .font(.system(size: 12, weight: .bold)).foregroundColor(.loopGray)
  259. .padding(.leading, 8)
  260. } else if let tempBasalString = tempBasalString {
  261. Text(tempBasalString)
  262. .font(.system(size: 12, weight: .bold))
  263. .foregroundColor(.insulin)
  264. .padding(.leading, 8)
  265. }
  266. if let tempTargetString = tempTargetString {
  267. Text(tempTargetString)
  268. .font(.caption)
  269. .foregroundColor(.secondary)
  270. }
  271. Spacer()
  272. if let overrideString = overrideString {
  273. Text("👤 " + overrideString)
  274. .font(.system(size: 12))
  275. .foregroundColor(.secondary)
  276. .padding(.trailing, 8)
  277. }
  278. if state.closedLoop, state.settingsManager.preferences.maxIOB == 0 {
  279. Text("Max IOB: 0").font(.callout).foregroundColor(.orange).padding(.trailing, 20)
  280. }
  281. if let progress = state.bolusProgress {
  282. HStack {
  283. Text("Bolusing")
  284. .font(.system(size: 12, weight: .bold)).foregroundColor(.insulin)
  285. ProgressView(value: Double(progress))
  286. .progressViewStyle(BolusProgressViewStyle())
  287. .padding(.trailing, 8)
  288. }
  289. .onTapGesture {
  290. state.cancelBolus()
  291. }
  292. }
  293. }
  294. .frame(maxWidth: .infinity, maxHeight: 30)
  295. }
  296. var legendPanel: some View {
  297. ZStack {
  298. HStack(alignment: .center) {
  299. Group {
  300. Circle().fill(Color.loopGreen).frame(width: 8, height: 8)
  301. Text("BG")
  302. .font(.system(size: 12, weight: .bold)).foregroundColor(.loopGreen)
  303. }
  304. Group {
  305. Circle().fill(Color.insulin).frame(width: 8, height: 8)
  306. .padding(.leading, 8)
  307. Text("IOB")
  308. .font(.system(size: 12, weight: .bold)).foregroundColor(.insulin)
  309. }
  310. Group {
  311. Circle().fill(Color.zt).frame(width: 8, height: 8)
  312. .padding(.leading, 8)
  313. Text("ZT")
  314. .font(.system(size: 12, weight: .bold)).foregroundColor(.zt)
  315. }
  316. Group {
  317. Circle().fill(Color.loopYellow).frame(width: 8, height: 8)
  318. .padding(.leading, 8)
  319. Text("COB")
  320. .font(.system(size: 12, weight: .bold)).foregroundColor(.loopYellow)
  321. }
  322. Group {
  323. Circle().fill(Color.uam).frame(width: 8, height: 8)
  324. .padding(.leading, 8)
  325. Text("UAM")
  326. .font(.system(size: 12, weight: .bold)).foregroundColor(.uam)
  327. }
  328. if let eventualBG = state.eventualBG {
  329. Text(
  330. "⇢ " + numberFormatter.string(
  331. from: (state.units == .mmolL ? eventualBG.asMmolL : Decimal(eventualBG)) as NSNumber
  332. )!
  333. )
  334. .font(.system(size: 12, weight: .bold)).foregroundColor(.secondary)
  335. }
  336. }
  337. .frame(maxWidth: .infinity)
  338. .padding([.bottom], 20)
  339. }
  340. }
  341. var mainChart: some View {
  342. ZStack {
  343. if state.animatedBackground {
  344. SpriteView(scene: spriteScene, options: [.allowsTransparency])
  345. .ignoresSafeArea()
  346. .frame(minWidth: 0, maxWidth: .infinity, minHeight: 0, maxHeight: .infinity)
  347. }
  348. MainChartView(
  349. glucose: $state.glucose,
  350. isManual: $state.isManual,
  351. suggestion: $state.suggestion,
  352. tempBasals: $state.tempBasals,
  353. boluses: $state.boluses,
  354. suspensions: $state.suspensions,
  355. announcement: $state.announcement,
  356. hours: .constant(state.filteredHours),
  357. maxBasal: $state.maxBasal,
  358. autotunedBasalProfile: $state.autotunedBasalProfile,
  359. basalProfile: $state.basalProfile,
  360. tempTargets: $state.tempTargets,
  361. carbs: $state.carbs,
  362. timerDate: $state.timerDate,
  363. units: $state.units,
  364. smooth: $state.smooth,
  365. highGlucose: $state.highGlucose,
  366. lowGlucose: $state.lowGlucose,
  367. screenHours: $state.screenHours,
  368. displayXgridLines: $state.displayXgridLines,
  369. displayYgridLines: $state.displayYgridLines,
  370. thresholdLines: $state.thresholdLines
  371. )
  372. }
  373. .padding(.bottom)
  374. .modal(for: .dataTable, from: self)
  375. }
  376. @ViewBuilder private func profiles(_: GeometryProxy) -> some View {
  377. let colour: Color = colorScheme == .dark ? .black : .white
  378. // Rectangle().fill(colour).frame(maxHeight: 1)
  379. ZStack {
  380. Rectangle().fill(Color.gray.opacity(0.3)).frame(maxHeight: 40)
  381. let cancel = fetchedPercent.first?.enabled ?? false
  382. HStack(spacing: cancel ? 25 : 15) {
  383. Text(selectedProfile().name).foregroundColor(.secondary)
  384. if cancel, selectedProfile().isOn {
  385. Button { showCancelAlert.toggle() }
  386. label: {
  387. Image(systemName: "xmark")
  388. .foregroundStyle(.secondary)
  389. }
  390. }
  391. Button { state.showModal(for: .overrideProfilesConfig) }
  392. label: {
  393. Image(systemName: "person.3.sequence.fill")
  394. .symbolRenderingMode(.palette)
  395. .foregroundStyle(
  396. !(fetchedPercent.first?.enabled ?? false) ? .green : .cyan,
  397. !(fetchedPercent.first?.enabled ?? false) ? .cyan : .green,
  398. .purple
  399. )
  400. }
  401. }
  402. }
  403. .alert(
  404. "Return to Normal?", isPresented: $showCancelAlert,
  405. actions: {
  406. Button("No", role: .cancel) {}
  407. Button("Yes", role: .destructive) {
  408. state.cancelProfile()
  409. }
  410. }, message: { Text("This will change settings back to your normal profile.") }
  411. )
  412. Rectangle().fill(colour).frame(maxHeight: 1)
  413. }
  414. private func selectedProfile() -> (name: String, isOn: Bool) {
  415. var profileString = ""
  416. var display: Bool = false
  417. let duration = (fetchedPercent.first?.duration ?? 0) as Decimal
  418. let indefinite = fetchedPercent.first?.indefinite ?? false
  419. let addedMinutes = Int(duration)
  420. let date = fetchedPercent.first?.date ?? Date()
  421. if date.addingTimeInterval(addedMinutes.minutes.timeInterval) > Date() || indefinite {
  422. display.toggle()
  423. }
  424. if fetchedPercent.first?.enabled ?? false, !(fetchedPercent.first?.isPreset ?? false), display {
  425. profileString = NSLocalizedString("Custom Profile", comment: "Custom but unsaved Profile")
  426. } else if !(fetchedPercent.first?.enabled ?? false) || !display {
  427. profileString = NSLocalizedString("Normal Profile", comment: "Your normal Profile. Use a short string")
  428. } else {
  429. let id_ = fetchedPercent.first?.id ?? ""
  430. let profile = fetchedProfiles.filter({ $0.id == id_ }).first
  431. if profile != nil {
  432. profileString = profile?.name?.description ?? ""
  433. }
  434. }
  435. return (name: profileString, isOn: display)
  436. }
  437. @ViewBuilder private func bottomPanel(_ geo: GeometryProxy) -> some View {
  438. ZStack {
  439. Rectangle().fill(Color.gray.opacity(0.3)).frame(height: 50 + geo.safeAreaInsets.bottom)
  440. HStack {
  441. Button { state.showModal(for: .addCarbs(editMode: false, override: false)) }
  442. label: {
  443. ZStack(alignment: Alignment(horizontal: .trailing, vertical: .bottom)) {
  444. Image("carbs")
  445. .renderingMode(.template)
  446. .resizable()
  447. .frame(width: 24, height: 24)
  448. .foregroundColor(.loopYellow)
  449. .padding(8)
  450. if let carbsReq = state.carbsRequired {
  451. Text(numberFormatter.string(from: carbsReq as NSNumber)!)
  452. .font(.caption)
  453. .foregroundColor(.white)
  454. .padding(4)
  455. .background(Capsule().fill(Color.red))
  456. }
  457. }
  458. }.buttonStyle(.borderless)
  459. Spacer()
  460. Button { state.showModal(for: .addTempTarget) }
  461. label: {
  462. Image("target")
  463. .renderingMode(.template)
  464. .resizable()
  465. .frame(width: 24, height: 24)
  466. .padding(8)
  467. }
  468. .foregroundColor(.loopGreen)
  469. .buttonStyle(.borderless)
  470. Spacer()
  471. Button {
  472. state.showModal(for: .bolus(
  473. waitForSuggestion: true,
  474. fetch: false
  475. ))
  476. }
  477. label: {
  478. Image("bolus")
  479. .renderingMode(.template)
  480. .resizable()
  481. .frame(width: 24, height: 24)
  482. .padding(8)
  483. }
  484. .foregroundColor(.insulin)
  485. .buttonStyle(.borderless)
  486. Spacer()
  487. if state.allowManualTemp {
  488. Button { state.showModal(for: .manualTempBasal) }
  489. label: {
  490. Image("bolus1")
  491. .renderingMode(.template)
  492. .resizable()
  493. .frame(width: 24, height: 24)
  494. .padding(8)
  495. }
  496. .foregroundColor(.insulin)
  497. .buttonStyle(.borderless)
  498. Spacer()
  499. }
  500. Button { state.showModal(for: .statistics)
  501. }
  502. label: {
  503. Image(systemName: "chart.xyaxis.line")
  504. .renderingMode(.template)
  505. .resizable()
  506. .frame(width: 24, height: 24)
  507. .padding(8)
  508. }
  509. .foregroundColor(.purple)
  510. .buttonStyle(.borderless)
  511. Spacer()
  512. Button { state.showModal(for: .settings) }
  513. label: {
  514. Image("settings1")
  515. .renderingMode(.template)
  516. .resizable()
  517. .frame(width: 24, height: 24)
  518. .padding(8)
  519. }
  520. .foregroundColor(.loopGray)
  521. .buttonStyle(.borderless)
  522. }
  523. .padding(.horizontal, 24)
  524. .padding(.bottom, geo.safeAreaInsets.bottom)
  525. }
  526. }
  527. var body: some View {
  528. GeometryReader { geo in
  529. VStack(spacing: 0) {
  530. header(geo)
  531. infoPanel
  532. mainChart
  533. legendPanel
  534. profiles(geo)
  535. bottomPanel(geo)
  536. }
  537. .edgesIgnoringSafeArea(.vertical)
  538. }
  539. .onAppear(perform: configureView)
  540. .navigationTitle("Home")
  541. .navigationBarHidden(true)
  542. .ignoresSafeArea(.keyboard)
  543. .popup(isPresented: isStatusPopupPresented, alignment: .top, direction: .top) {
  544. popup
  545. .padding()
  546. .background(
  547. RoundedRectangle(cornerRadius: 8, style: .continuous)
  548. .fill(Color(UIColor.darkGray))
  549. )
  550. .onTapGesture {
  551. isStatusPopupPresented = false
  552. }
  553. .gesture(
  554. DragGesture(minimumDistance: 10, coordinateSpace: .local)
  555. .onEnded { value in
  556. if value.translation.height < 0 {
  557. isStatusPopupPresented = false
  558. }
  559. }
  560. )
  561. }
  562. }
  563. private var popup: some View {
  564. VStack(alignment: .leading, spacing: 4) {
  565. Text(state.statusTitle).font(.headline).foregroundColor(.white)
  566. .padding(.bottom, 4)
  567. if let suggestion = state.suggestion {
  568. TagCloudView(tags: suggestion.reasonParts).animation(.none, value: false)
  569. Text(suggestion.reasonConclusion.capitalizingFirstLetter()).font(.caption).foregroundColor(.white)
  570. } else {
  571. Text("No sugestion found").font(.body).foregroundColor(.white)
  572. }
  573. if let errorMessage = state.errorMessage, let date = state.errorDate {
  574. Text(NSLocalizedString("Error at", comment: "") + " " + dateFormatter.string(from: date))
  575. .foregroundColor(.white)
  576. .font(.headline)
  577. .padding(.bottom, 4)
  578. .padding(.top, 8)
  579. Text(errorMessage).font(.caption).foregroundColor(.loopRed)
  580. } else if let suggestion = state.suggestion, (suggestion.bg ?? 100) == 400 {
  581. Text("Invalid CGM reading (HIGH).").font(.callout).bold().foregroundColor(.loopRed).padding(.top, 8)
  582. Text("SMBs and High Temps Disabled.").font(.caption).foregroundColor(.white).padding(.bottom, 4)
  583. }
  584. }
  585. }
  586. }
  587. }