Marvin Polscheit před 10 měsíci
rodič
revize
be01b3af9a

+ 3 - 3
Trio/Sources/Localizations/Main/Localizable.xcstrings

@@ -59538,6 +59538,9 @@
         }
       }
     },
+    "Clear filters" : {
+
+    },
     "Click to Snooze Alerts" : {
       "localizations" : {
         "bg" : {
@@ -178070,9 +178073,6 @@
         }
       }
     },
-    "Select All" : {
-
-    },
     "Select CGM Model" : {
       "localizations" : {
         "bg" : {

+ 48 - 47
Trio/Sources/Modules/DataTable/View/DataTableRootView.swift

@@ -181,53 +181,54 @@ extension DataTable {
 
         private var filterTreatmentsButton: some View {
             Button(action: {
-                   showTreatmentTypeFilter.toggle()
-               }) {
-                   HStack {
-                       Text("Filter")
-                           .foregroundColor(Color.accentColor)
-                       Image(systemName: "line.3.horizontal.decrease.circle")
-                           .foregroundColor(Color.accentColor)
-                   }
-               }
-               .popover(isPresented: $showTreatmentTypeFilter, arrowEdge: .top) {
-                   VStack(alignment: .leading, spacing: 10) { Button(action: {
-                       selectedTreatmentTypes = ["Bolus", "External Bolus", "SMB", "Temp Basal", "Suspend", "Other"]
-                   }) { HStack {
-                       Image(systemName: selectedTreatmentTypes.count == 6 ? "checkmark.circle.fill" : "circle")
-                           .frame(width: 20)
-                       Text("Select All")
-                   }
-               }
-               .buttonStyle(.plain)
-                               
-               Divider()
-               
-               ForEach(["Bolus", "External Bolus", "SMB", "Temp Basal", "Suspend", "Other"], id: \.self) { type in
-                   Button(action: {
-                       toggleTreatmentType(type)
-                   }) {
-                       HStack {
-                           Image(systemName: selectedTreatmentTypes.contains(type) ? "checkmark.circle.fill" : "circle")
-                               .frame(width: 20)
-                           Text(type)
-                       }
-                   }
-                   .buttonStyle(.plain)
-               }
-               
-               Divider()
-               
-               Button("Done") {
-                   showTreatmentTypeFilter = false
-               }
-               .frame(maxWidth: .infinity)
-               .buttonStyle(.borderedProminent)
-           }
-           .padding()
-           .frame(minWidth: 200)
-
-               }
+                showTreatmentTypeFilter.toggle()
+            }) {
+                HStack {
+                    Text("Filter")
+                        .foregroundColor(Color.accentColor)
+                    Image(systemName: "line.3.horizontal.decrease.circle")
+                        .foregroundColor(Color.accentColor)
+                }
+            }
+            .popover(isPresented: $showTreatmentTypeFilter, arrowEdge: .top) {
+                VStack(alignment: .leading, spacing: 10) {
+                    Button(action: {
+                        selectedTreatmentTypes = ["Bolus", "External Bolus", "SMB", "Temp Basal", "Suspend", "Other"]
+                    }) {
+                        HStack {
+                            Image(systemName: selectedTreatmentTypes.count == 6 ? "checkmark.circle.fill" : "circle")
+                                .frame(width: 20)
+                            Text("Select All")
+                        }
+                    }
+                    .buttonStyle(.plain)
+
+                    Divider()
+
+                    ForEach(["Bolus", "External Bolus", "SMB", "Temp Basal", "Suspend", "Other"], id: \.self) { type in
+                        Button(action: {
+                            toggleTreatmentType(type)
+                        }) {
+                            HStack {
+                                Image(systemName: selectedTreatmentTypes.contains(type) ? "checkmark.circle.fill" : "circle")
+                                    .frame(width: 20)
+                                Text(type)
+                            }
+                        }
+                        .buttonStyle(.plain)
+                    }
+
+                    Divider()
+
+                    Button("Done") {
+                        showTreatmentTypeFilter = false
+                    }
+                    .frame(maxWidth: .infinity)
+                    .buttonStyle(.borderedProminent)
+                }
+                .padding()
+                .presentationCompactAdaptation(.popover)
+            }
         }
 
         private var filterFutureEntriesButton: some View {