WIP
This commit is contained in:
@@ -28,7 +28,7 @@ struct ExternalWorkoutDetailView: View {
|
||||
VStack {
|
||||
if let currentExercisePositionString = bridgeModule.currentExercisePositionString {
|
||||
Text(currentExercisePositionString)
|
||||
.font(Font.system(size: 55))
|
||||
.font(Font.system(size: 75))
|
||||
.scaledToFit()
|
||||
.minimumScaleFactor(0.01)
|
||||
.lineLimit(1)
|
||||
@@ -47,7 +47,21 @@ struct ExternalWorkoutDetailView: View {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Text("nothing here bro")
|
||||
GeometryReader { metrics in
|
||||
VStack {
|
||||
Spacer()
|
||||
HStack {
|
||||
Spacer()
|
||||
|
||||
Image(uiImage: Bundle.main.icon ?? UIImage())
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.frame(width: metrics.size.width/2, height: metrics.size.height/2)
|
||||
Spacer()
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.onChange(of: bridgeModule.currentExercise, perform: { newValue in
|
||||
@@ -69,7 +83,7 @@ struct ExternalWorkoutDetailView: View {
|
||||
}
|
||||
})
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
.background(.background)
|
||||
.background(bridgeModule.currentWorkout == nil ? Color(red: 157/255, green: 138/255, blue: 255/255) : Color(uiColor: .systemBackground))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,7 +174,8 @@ struct ExtCountdownView: View {
|
||||
.frame(height: metrics.size.height * 0.5)
|
||||
|
||||
HStack {
|
||||
if let duration = currenExercise.duration {
|
||||
if let duration = currenExercise.duration,
|
||||
duration > 0 {
|
||||
ProgressView(value: Float(bridgeModule.currentExerciseTimeLeft), total: Float(duration))
|
||||
.scaleEffect(x: 1, y: 6, anchor: .center)
|
||||
Text("\(bridgeModule.currentExerciseTimeLeft)")
|
||||
@@ -170,9 +185,10 @@ struct ExtCountdownView: View {
|
||||
.lineLimit(1)
|
||||
.padding(.leading)
|
||||
.padding(.trailing, 100)
|
||||
} else if let reps = currenExercise.reps {
|
||||
} else if let reps = currenExercise.reps,
|
||||
reps > 0 {
|
||||
Text("\(reps)")
|
||||
.font(Font.system(size: 75))
|
||||
.font(Font.system(size: 150))
|
||||
.scaledToFit()
|
||||
.minimumScaleFactor(0.01)
|
||||
.lineLimit(1)
|
||||
|
||||
Reference in New Issue
Block a user