feat(watch): add rest duration display in workout views
This commit is contained in:
@@ -51,6 +51,65 @@
|
||||
},
|
||||
"%lldm total" : {
|
||||
|
||||
},
|
||||
"%ds rest" : {
|
||||
"extractionState" : "manual",
|
||||
"localizations" : {
|
||||
"de" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "%ds Pause"
|
||||
}
|
||||
},
|
||||
"dk" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "%ds hvile"
|
||||
}
|
||||
},
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "%ds rest"
|
||||
}
|
||||
},
|
||||
"es" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "%ds descanso"
|
||||
}
|
||||
},
|
||||
"fr" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "%ds repos"
|
||||
}
|
||||
},
|
||||
"it" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "%ds recupero"
|
||||
}
|
||||
},
|
||||
"nl" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "%ds rust"
|
||||
}
|
||||
},
|
||||
"pl" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "%ds odpoczynku"
|
||||
}
|
||||
},
|
||||
"pt" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "%ds descanso"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"%lldx%lldm" : {
|
||||
"localizations" : {
|
||||
|
||||
@@ -165,6 +165,7 @@ struct WorkoutOverviewPage: View {
|
||||
|
||||
if let workout = workoutManager.selectedWorkout {
|
||||
ForEach(Array(workout.sets.enumerated()), id: \.offset) { i, set in
|
||||
VStack(alignment: .leading, spacing: 2) {
|
||||
HStack {
|
||||
Circle()
|
||||
.fill(i < workoutManager.currentSetIndex ? .green :
|
||||
@@ -178,6 +179,18 @@ struct WorkoutOverviewPage: View {
|
||||
.font(.caption2)
|
||||
.foregroundColor(.secondary)
|
||||
}
|
||||
if set.restType != "none", set.restDuration > 0 {
|
||||
HStack(spacing: 2) {
|
||||
Spacer().frame(width: 14)
|
||||
Image(systemName: "clock")
|
||||
.font(.caption2)
|
||||
.foregroundColor(.orange)
|
||||
Text(String(format: "%ds rest", Int(set.restDuration)))
|
||||
.font(.caption2)
|
||||
.foregroundColor(.orange)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ struct WorkoutDetailView: View {
|
||||
|
||||
Section("Sets") {
|
||||
ForEach(Array(workout.sets.enumerated()), id: \.offset) { i, set in
|
||||
VStack(alignment: .leading, spacing: 2) {
|
||||
HStack {
|
||||
Text("\(i + 1). \(set.stroke)")
|
||||
.font(.body)
|
||||
@@ -34,6 +35,18 @@ struct WorkoutDetailView: View {
|
||||
.font(.caption)
|
||||
.foregroundColor(.secondary)
|
||||
}
|
||||
if set.restType != "none", set.restDuration > 0 {
|
||||
HStack(spacing: 2) {
|
||||
Spacer().frame(width: 14)
|
||||
Image(systemName: "clock")
|
||||
.font(.caption2)
|
||||
.foregroundColor(.orange)
|
||||
Text(String(format: "%ds rest", Int(set.restDuration)))
|
||||
.font(.caption2)
|
||||
.foregroundColor(.orange)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user