Эх сурвалжийг харах

Add a couple of non-implemented buttons to BusgetViewSummary

- quick budget for this month
- settings for this budget
Andrea Franceschini 4 жил өмнө
parent
commit
aa5f06e8b6
1 өөрчлөгдсөн 16 нэмэгдсэн , 1 устгасан
  1. 16 1
      ydnab/BudgetView.swift

+ 16 - 1
ydnab/BudgetView.swift

@@ -112,11 +112,22 @@ struct BudgetViewSummary: View {
 
     @State private var showMonthPicker: Bool = false
 
+    @State private var showNotImplemented: Bool = false
+
     var body: some View {
         VStack {
             HStack {
-                Button("\(monthName) \(String(year))", action: { withAnimation() { showMonthPicker.toggle() } } )
+                Button(action: { withAnimation() { showMonthPicker.toggle() } } ) {
+                    Text("\(monthName) \(String(year))")
+                    Image(systemName: showMonthPicker ? "chevron.up" : "chevron.down")
+                }
                 Spacer()
+                Button(action: { showNotImplemented.toggle() }) { // TODO: Implement this
+                    Image(systemName: "bolt")
+                }
+                Button(action: { showNotImplemented.toggle() }) { // TODO: Implement this
+                    Image(systemName: "gear")
+                }.padding(.leading, 11)
             }
             .padding(.vertical, 11)
 
@@ -129,6 +140,10 @@ struct BudgetViewSummary: View {
                 Spacer()
                 Text("$ 0.00")
             }
+
+            .alert(isPresented: $showNotImplemented) {
+                Alert(title: Text("Not Implemented!"))
+            }
         }
         .padding(.vertical, 11)
     }