From b3f21769ec4c0e20025009e788d74fe59b5d8098 Mon Sep 17 00:00:00 2001 From: kutesir Date: Thu, 28 May 2026 00:00:46 +0300 Subject: [PATCH] refactor(design): replace workout emoji icon with segmented section bar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- KisaniCal/Views/CalendarView.swift | 22 +++++++++++++++++++--- KisaniCal/Views/TodayView.swift | 4 +--- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/KisaniCal/Views/CalendarView.swift b/KisaniCal/Views/CalendarView.swift index d0daeb6..6e60350 100644 --- a/KisaniCal/Views/CalendarView.swift +++ b/KisaniCal/Views/CalendarView.swift @@ -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..