refactor(design): replace workout emoji icon with segmented section bar
Replace the emoji tile on CalendarWorkoutBlock and WorkoutSessionSheet header with WorkoutSectionBar — a stack of N horizontal segments, one per workout section. No emojis, no custom per-program images.
This commit is contained in:
@@ -963,10 +963,8 @@ struct CalendarWorkoutBlock: View {
|
||||
VStack(alignment: .leading, spacing: 0) {
|
||||
// ── Header row — taps open session ──
|
||||
HStack(spacing: 8) {
|
||||
Text(program.emoji).font(.system(size: 16))
|
||||
WorkoutSectionBar(count: program.sections.count)
|
||||
.frame(width: 30, height: 30)
|
||||
.background(AppColors.blueSoft)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 8))
|
||||
|
||||
VStack(alignment: .leading, spacing: 1) {
|
||||
Text(program.name)
|
||||
@@ -1035,3 +1033,21 @@ struct CalendarWorkoutBlock: View {
|
||||
.overlay(RoundedRectangle(cornerRadius: AppRadius.small).stroke(AppColors.blue.opacity(0.2), lineWidth: 1))
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Workout Section Bar
|
||||
struct WorkoutSectionBar: View {
|
||||
let count: Int
|
||||
var body: some View {
|
||||
let n = max(1, min(6, count))
|
||||
VStack(spacing: 2.5) {
|
||||
ForEach(0..<n, id: \.self) { _ in
|
||||
RoundedRectangle(cornerRadius: 1.5)
|
||||
.fill(AppColors.blue)
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
}
|
||||
}
|
||||
.padding(7)
|
||||
.background(AppColors.blueSoft)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 8))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -424,10 +424,8 @@ struct WorkoutSessionSheet: View {
|
||||
VStack(spacing: 0) {
|
||||
// ── Header ──
|
||||
HStack(spacing: 12) {
|
||||
Text(vm.workoutEmoji).font(.system(size: 22))
|
||||
WorkoutSectionBar(count: vm.activeSections.count)
|
||||
.frame(width: 44, height: 44)
|
||||
.background(AppColors.accentSoft)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 12))
|
||||
|
||||
VStack(alignment: .leading, spacing: 2) {
|
||||
Text(vm.workoutTitle)
|
||||
|
||||
Reference in New Issue
Block a user