WIP
This commit is contained in:
@@ -13,17 +13,41 @@ struct ContentView: View {
|
|||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
VStack {
|
VStack {
|
||||||
|
HStack {
|
||||||
if let model = vm.watchPackageModel {
|
if let model = vm.watchPackageModel {
|
||||||
Text(model.currentExerciseName)
|
Text(model.currentExerciseName)
|
||||||
|
.font(Font.system(size: 55))
|
||||||
|
.scaledToFit()
|
||||||
|
.minimumScaleFactor(0.01)
|
||||||
|
.lineLimit(1)
|
||||||
|
.foregroundColor(.white)
|
||||||
|
Divider()
|
||||||
Text("\(model.currentTimeLeft )")
|
Text("\(model.currentTimeLeft )")
|
||||||
|
.font(Font.system(size: 55))
|
||||||
|
.scaledToFit()
|
||||||
|
.minimumScaleFactor(0.01)
|
||||||
|
.lineLimit(1)
|
||||||
|
.foregroundColor(.white)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if let heartValue = vm.heartValue {
|
|
||||||
HStack {
|
HStack {
|
||||||
|
if let heartValue = vm.heartValue {
|
||||||
|
VStack {
|
||||||
Image(systemName: "heart.fill")
|
Image(systemName: "heart.fill")
|
||||||
|
.font(Font.system(size: 22))
|
||||||
|
.scaledToFit()
|
||||||
|
.minimumScaleFactor(0.01)
|
||||||
|
.lineLimit(1)
|
||||||
|
.foregroundColor(.red)
|
||||||
Text("\(heartValue)")
|
Text("\(heartValue)")
|
||||||
|
.font(Font.system(size: 55))
|
||||||
|
.scaledToFit()
|
||||||
|
.minimumScaleFactor(0.01)
|
||||||
|
.lineLimit(1)
|
||||||
|
.foregroundColor(.red)
|
||||||
}
|
}
|
||||||
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||||
}
|
}
|
||||||
Button(action: {
|
Button(action: {
|
||||||
vm.nextExercise()
|
vm.nextExercise()
|
||||||
@@ -32,6 +56,8 @@ struct ContentView: View {
|
|||||||
.font(.title)
|
.font(.title)
|
||||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||||
})
|
})
|
||||||
|
.buttonStyle(BorderedButtonStyle(tint: .blue))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.padding()
|
.padding()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user