This commit is contained in:
Trey t
2023-06-23 13:34:29 -05:00
parent a43acc9c27
commit 48f23f8e77
15 changed files with 644 additions and 6 deletions

View File

@@ -0,0 +1,44 @@
//
// ContentView.swift
// Werkout_watch Watch App
//
// Created by Trey Tartt on 6/22/23.
//
import SwiftUI
struct ContentView: View {
let exercise = PreviewWorkout.parseEquipment()[2]
@StateObject var vm = WatchMainViewModel()
var body: some View {
VStack {
if let model = vm.watchPackageModel {
Text(model.currentExerciseName)
Text("\(model.currentTimeLeft )")
}
if let heartValue = vm.heartValue {
HStack {
Image(systemName: "heart.fill")
Text("\(heartValue)")
}
}
Button(action: {
vm.nextExercise()
}, label: {
Image(systemName: "arrow.forward")
.font(.title)
.frame(maxWidth: .infinity, maxHeight: .infinity)
})
}
.padding()
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}