瀏覽代碼

readd basal coverage text

Marvin Polscheit 6 月之前
父節點
當前提交
edeb1c52cb
共有 1 個文件被更改,包括 21 次插入0 次删除
  1. 21 0
      Trio/Sources/Modules/BasalProfileEditor/View/BasalProfileEditorRootView.swift

+ 21 - 0
Trio/Sources/Modules/BasalProfileEditor/View/BasalProfileEditorRootView.swift

@@ -124,6 +124,27 @@ extension BasalProfileEditor {
                     ScrollView {
                         LazyVStack {
                             VStack(alignment: .leading, spacing: 0) {
+                                if !state.canAdd {
+                                    VStack {
+                                        Text(
+                                            "Basal profile covers 24 hours. You cannot add more rates. Please remove or adjust existing rates to make space."
+                                        ).bold()
+                                    }
+                                    .frame(maxWidth: .infinity, alignment: .leading)
+                                    .padding()
+                                    .background(Color.tabBar)
+                                    .clipShape(
+                                        .rect(
+                                            topLeadingRadius: 10,
+                                            bottomLeadingRadius: 10,
+                                            bottomTrailingRadius: 10,
+                                            topTrailingRadius: 10
+                                        )
+                                    )
+                                    .padding(.horizontal)
+                                    .padding(.top)
+                                }
+
                                 // Chart visualization
                                 if !state.items.isEmpty {
                                     basalProfileChart