UI fixes found while testing the workout flow

· The rest timer floats above the tab bar, so it covered the set rows
  underneath it — during a rest, the next set was behind the bar. The page
  now gets enough bottom padding while a rest runs to scroll clear of it.
· "Skip today", sitting right under "Save & start workout", reads like
  skipping the session rather than the weigh-in. It says "Start without
  weighing in".
· The calendar legend drew "Planned" in blue while planned days have
  always had a grey dot.
· Body weight showed "− 0" when it hadn't moved since the last weigh-in.
· In a superset both exercises are on screen at once, so their animations
  give way: 180px meant scrolling a full screen between two exercises you
  are meant to alternate.
This commit is contained in:
Duarte Santos committed 2026-07-24 23:45:36 +02:00
1 parent 43d5495007
commit 827c0f8505
4 files changed
+17 -5

No files matched your search

+7
View File
@@ -1,3 +1,4 @@
import { useEffect } from 'react'
import { useUI } from '../store/useUI.js'
import { t } from '../lib/i18n.js'
import { Button } from './ui.jsx'
@@ -5,6 +6,12 @@ import { Button } from './ui.jsx'
export default function RestTimer() {
const timer = useUI(s => s.timer)
const { addRest, stopRest } = useUI()
// The bar is fixed above the tab bar and floats over whatever is beneath it — during a
// rest that was the next set's row. Extra bottom padding lets the page scroll clear.
useEffect(() => {
document.body.classList.toggle('resting', !!timer)
return () => document.body.classList.remove('resting')
}, [!!timer])
if (!timer) return null
const pct = (timer.left / timer.total) * 100
const m = Math.floor(timer.left / 60), s = String(timer.left % 60).padStart(2, '0')