|
|
|
|
@ -31,6 +31,8 @@ struct ContentView<T : AbstractTimer>: View { |
|
|
|
|
@State private var siriTipShown: Bool = false |
|
|
|
|
|
|
|
|
|
@State private var showSettingsSheet: Bool = false |
|
|
|
|
@State private var showStatsSheet: Bool = false |
|
|
|
|
@State private var showAddSheet: Bool = false |
|
|
|
|
|
|
|
|
|
@State private var showSubscriptionSheet: Bool = false |
|
|
|
|
|
|
|
|
|
@ -74,7 +76,7 @@ struct ContentView<T : AbstractTimer>: View { |
|
|
|
|
SiriTimerView(timer: self.boringContext.siriTimer, isVisible: self.$siriTipShown) |
|
|
|
|
|
|
|
|
|
HStack(alignment: .center) { |
|
|
|
|
VolumeView() |
|
|
|
|
VolumeView(changeVolume: true) |
|
|
|
|
.padding(12.0) |
|
|
|
|
}.frame(width: 300.0, height: 40.0) |
|
|
|
|
.background(Color(white: 0.9)) |
|
|
|
|
@ -86,7 +88,9 @@ struct ContentView<T : AbstractTimer>: View { |
|
|
|
|
SiriTimerView(timer: self.boringContext.siriTimer, isVisible: self.$siriTipShown) |
|
|
|
|
Spacer() |
|
|
|
|
} |
|
|
|
|
VolumeView().padding(12.0).frame(width: 300.0, height: 40.0) |
|
|
|
|
VolumeView() |
|
|
|
|
.padding(12.0) |
|
|
|
|
.frame(width: 300.0, height: 40.0) |
|
|
|
|
.background(Color(white: 0.9)) |
|
|
|
|
.cornerRadius(16.0) |
|
|
|
|
}.padding(.horizontal) |
|
|
|
|
@ -118,6 +122,16 @@ struct ContentView<T : AbstractTimer>: View { |
|
|
|
|
.sheet(isPresented: self.$showSubscriptionSheet, content: { |
|
|
|
|
StoreView(isPresented: self.$showSubscriptionSheet) |
|
|
|
|
}) |
|
|
|
|
.sheet(isPresented: self.$showStatsSheet, content: { |
|
|
|
|
NavigationStack { |
|
|
|
|
ActivitiesView() |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
.sheet(isPresented: self.$showAddSheet, content: { |
|
|
|
|
NavigationStack { |
|
|
|
|
PresetsView(tabSelection: .constant(0)) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
.toolbar { |
|
|
|
|
ToolbarItem(placement: .navigationBarLeading) { |
|
|
|
|
Button { |
|
|
|
|
@ -128,7 +142,7 @@ struct ContentView<T : AbstractTimer>: View { |
|
|
|
|
Text(self.isEditing ? "Done" : "Edit") |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
ToolbarItem(placement: .navigationBarTrailing) { |
|
|
|
|
ToolbarItemGroup(placement: .navigationBarTrailing) { |
|
|
|
|
Button { |
|
|
|
|
withAnimation { |
|
|
|
|
self.showSettingsSheet.toggle() |
|
|
|
|
@ -136,6 +150,20 @@ struct ContentView<T : AbstractTimer>: View { |
|
|
|
|
} label: { |
|
|
|
|
Image(systemName: "gearshape.fill") |
|
|
|
|
} |
|
|
|
|
Button { |
|
|
|
|
withAnimation { |
|
|
|
|
self.showAddSheet.toggle() |
|
|
|
|
} |
|
|
|
|
} label: { |
|
|
|
|
Image(systemName: "plus") |
|
|
|
|
} |
|
|
|
|
Button { |
|
|
|
|
withAnimation { |
|
|
|
|
self.showStatsSheet.toggle() |
|
|
|
|
} |
|
|
|
|
} label: { |
|
|
|
|
Image(systemName: "chart.bar.doc.horizontal") |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.onAppear { |
|
|
|
|
|