This commit is contained in:
Trey t
2023-07-03 22:04:04 -05:00
parent 8acc8012cb
commit 3f51a8a952

View File

@@ -13,25 +13,51 @@ struct ContentView: View {
var body: some View { var body: some View {
VStack { VStack {
if let model = vm.watchPackageModel { HStack {
Text(model.currentExerciseName) if let model = vm.watchPackageModel {
Text(model.currentExerciseName)
Text("\(model.currentTimeLeft )") .font(Font.system(size: 55))
} .scaledToFit()
.minimumScaleFactor(0.01)
if let heartValue = vm.heartValue { .lineLimit(1)
HStack { .foregroundColor(.white)
Image(systemName: "heart.fill") Divider()
Text("\(heartValue)") Text("\(model.currentTimeLeft )")
.font(Font.system(size: 55))
.scaledToFit()
.minimumScaleFactor(0.01)
.lineLimit(1)
.foregroundColor(.white)
} }
} }
Button(action: {
vm.nextExercise() HStack {
}, label: { if let heartValue = vm.heartValue {
Image(systemName: "arrow.forward") VStack {
.font(.title) Image(systemName: "heart.fill")
.font(Font.system(size: 22))
.scaledToFit()
.minimumScaleFactor(0.01)
.lineLimit(1)
.foregroundColor(.red)
Text("\(heartValue)")
.font(Font.system(size: 55))
.scaledToFit()
.minimumScaleFactor(0.01)
.lineLimit(1)
.foregroundColor(.red)
}
.frame(maxWidth: .infinity, maxHeight: .infinity) .frame(maxWidth: .infinity, maxHeight: .infinity)
}) }
Button(action: {
vm.nextExercise()
}, label: {
Image(systemName: "arrow.forward")
.font(.title)
.frame(maxWidth: .infinity, maxHeight: .infinity)
})
.buttonStyle(BorderedButtonStyle(tint: .blue))
}
} }
.padding() .padding()
} }