Workout "mark all complete" + recurring-task done confirmation notification
- Workout window: the header ⋯ menu gains "Mark All Complete" and "Clear All Sets" (Manage Workouts preserved). New WorkoutViewModel.setAllSetsDone(_:) ticks every set across all sections/exercises and runs the normal completion/ logging path. - Recurring tasks: completing an occurrence now posts a quiet "✓ Done. Repeats <tomorrow / in 1 week / …>" confirmation via NotificationManager .notifyRecurringCompleted, phrased from the next active occurrence. Hooked into TaskViewModel.toggleOccurrence; un-completing does nothing. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -105,7 +105,24 @@ struct WorkoutView: View {
|
||||
Spacer()
|
||||
IButton(icon: "chart.bar.xaxis") { showStats = true }
|
||||
IButton(icon: "clock.arrow.circlepath") { showHistory = true }
|
||||
IButton(icon: "ellipsis") { showManage = true }
|
||||
Menu {
|
||||
Button { withAnimation(KisaniSpring.snappy) { vm.setAllSetsDone(true) } } label: {
|
||||
Label("Mark All Complete", systemImage: "checkmark.circle")
|
||||
}
|
||||
Button { withAnimation(KisaniSpring.snappy) { vm.setAllSetsDone(false) } } label: {
|
||||
Label("Clear All Sets", systemImage: "circle")
|
||||
}
|
||||
Divider()
|
||||
Button { showManage = true } label: { Label("Manage Workouts", systemImage: "slider.horizontal.3") }
|
||||
} label: {
|
||||
Image(systemName: "ellipsis")
|
||||
.font(.system(size: 13, weight: .medium))
|
||||
.foregroundColor(AppColors.text2(cs))
|
||||
.frame(width: 34, height: 34)
|
||||
.background(AppColors.surface2(cs))
|
||||
.clipShape(Circle())
|
||||
.overlay(Circle().stroke(AppColors.border(cs), lineWidth: 1))
|
||||
}
|
||||
}
|
||||
.listRowBackground(Color.clear)
|
||||
.listRowSeparator(.hidden)
|
||||
|
||||
Reference in New Issue
Block a user