Workout: im Listenmodus bleibt der Kopf (Name, Uhr, Saetze, Abbrechen/Fertig, Fortschritt) oben stehen

This commit is contained in:
Duarte Santos committed 2026-09-05 13:28:31 +02:00
1 parent 86d3723b88
commit 00adae77e8
2 files changed
+20

No files matched your search

+5
View File
@@ -719,12 +719,17 @@ function ActiveWorkout() {
}, [])
return <div className="narrow">
{/* In list mode the whole session scrolls under the header, so the header (name, clock,
set counter, discard/finish, progress) stays pinned — the one thing you want in view
while you are somewhere in the middle of a long stack. Cards mode never scrolls far. */}
<div className={'whdr' + (listMode ? ' stick' : '')}>
<div className="hdr">
<button className="iconbtn" aria-label={t('Discard')} onClick={() => confirmSheet({ title: t('Discard workout?'), message: t('The sets you logged in this session will be lost.'), confirmText: t('Discard'), danger: true, onConfirm: () => { update(s => { s.active = null }); stopRest(); stopWork(); nav('/home') } })}><Icon name="xmark" /></button>
<div style={{ textAlign: 'center' }}><div style={{ fontWeight: 600 }}>{A.name}</div><div className="sub">{A.backfill ? fmtDate(A.d, true) : <Elapsed start={A.start} />} · {t('{0} sets', done + '/' + total)}</div></div>
<button className="iconbtn" style={{ color: 'var(--acc)' }} aria-label={t('Finish')} onClick={finishWorkout}><Icon name="check" /></button>
</div>
<div className="wprog"><i style={{ width: (total ? done / total * 100 : 0) + '%' }} /></div>
</div>
{A.backfill && <div className="muted small" style={{ marginBottom: 8 }}>{t('Logging a past workout — no rest timers.')}</div>}
{A.entries.length ? (listMode ? (