|
|
|
|
@ -24,7 +24,6 @@ struct CountdownFormView : View { |
|
|
|
|
|
|
|
|
|
var nameBinding: Binding<String> |
|
|
|
|
var durationBinding: Binding<TimeInterval> |
|
|
|
|
var imageBinding: Binding<CoolPic> |
|
|
|
|
|
|
|
|
|
var hasRanges: Bool |
|
|
|
|
|
|
|
|
|
@ -56,15 +55,6 @@ struct CountdownFormView : View { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Section { |
|
|
|
|
HStack { |
|
|
|
|
Stepper("Repeat Count", value: self.$model.repeatCount, in: 1...100) |
|
|
|
|
Spacer() |
|
|
|
|
Text(self.model.repeatCount.formatted()) |
|
|
|
|
.frame(width: 24.0) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Section { |
|
|
|
|
Button { |
|
|
|
|
self._addInterval() |
|
|
|
|
@ -76,6 +66,15 @@ struct CountdownFormView : View { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Section { |
|
|
|
|
HStack { |
|
|
|
|
Stepper("Repeat Count", value: self.$model.repeatCount, in: 1...100) |
|
|
|
|
Spacer() |
|
|
|
|
Text(self.model.repeatCount.formatted()) |
|
|
|
|
.frame(width: 24.0) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
Section(header: Text("Name")) { |
|
|
|
|
@ -95,9 +94,7 @@ struct CountdownFormView : View { |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
SoundFormView( |
|
|
|
|
model: self.model, |
|
|
|
|
imageBinding: self.imageBinding) |
|
|
|
|
SoundFormView(model: self.model) |
|
|
|
|
} |
|
|
|
|
.sheet(item: self.$selectedRange) { item in |
|
|
|
|
RangeFormView(timeRange: item, |
|
|
|
|
@ -122,7 +119,6 @@ struct CountdownFormView_Previews: PreviewProvider { |
|
|
|
|
CountdownFormView( |
|
|
|
|
nameBinding: .constant(""), |
|
|
|
|
durationBinding: .constant(0.0), |
|
|
|
|
imageBinding: .constant(.pic3), |
|
|
|
|
hasRanges: true) |
|
|
|
|
.environmentObject(TimerModel()) |
|
|
|
|
} |
|
|
|
|
|