WIP
This commit is contained in:
@@ -8,20 +8,20 @@
|
||||
import SwiftUI
|
||||
|
||||
struct MainWatchView: View {
|
||||
@StateObject var vm = WatchMainViewModel()
|
||||
@StateObject var vm = WatchMainViewModel.shared
|
||||
|
||||
var body: some View {
|
||||
VStack {
|
||||
HStack {
|
||||
if let model = vm.watchPackageModel {
|
||||
Text(model.currentExerciseName)
|
||||
if vm.isInWorkout {
|
||||
Text(vm.watchPackageModel.currentExerciseName)
|
||||
.font(Font.system(size: 55))
|
||||
.scaledToFit()
|
||||
.minimumScaleFactor(0.01)
|
||||
.lineLimit(1)
|
||||
.foregroundColor(.white)
|
||||
Divider()
|
||||
Text("\(model.currentTimeLeft )")
|
||||
Text("\(vm.watchPackageModel.currentTimeLeft )")
|
||||
.font(Font.system(size: 55))
|
||||
.scaledToFit()
|
||||
.minimumScaleFactor(0.01)
|
||||
@@ -48,14 +48,19 @@ struct MainWatchView: View {
|
||||
}
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
}
|
||||
Button(action: {
|
||||
vm.nextExercise()
|
||||
}, label: {
|
||||
Image(systemName: "arrow.forward")
|
||||
.font(.title)
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
})
|
||||
.buttonStyle(BorderedButtonStyle(tint: .green))
|
||||
|
||||
if vm.isInWorkout {
|
||||
Button(action: {
|
||||
vm.nextExercise()
|
||||
}, label: {
|
||||
Image(systemName: "arrow.forward")
|
||||
.font(.title)
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
})
|
||||
.buttonStyle(BorderedButtonStyle(tint: .green))
|
||||
} else {
|
||||
Text("No Werkout")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user