Skip to content

Open-source gym & body-weight tracker, now in the App Store (iPhone + Apple Watch) and as an Android APK. Plan routines, log workouts, see which muscles are trained, import from Strong/Hevy/FitNotes. Self-host it or use it on the phone alone.

Day note: icon and label on one line in the tag chips

Duarte Santose3b16ceeec69
diff --git a/frontend/src/index.css b/frontend/src/index.css
index 875f25be3..93d4d905e 100644
--- a/frontend/src/index.css
+++ b/frontend/src/index.css
@@ -610,6 +610,10 @@ h4.sec{
.chip:active{background:var(--surface-2)}
.chip.on{background:var(--acc);color:var(--on-acc);font-weight:500}
.chip.on .dim{color:color-mix(in srgb,var(--on-acc) 62%,transparent)}
+/* A chip with an icon in front (the day note's Sick / Travelling / …): the icon is a block, so
+ without this the label wrapped under it and every chip became a two-line button. One line
+ each; a row wider than the sheet scrolls sideways like every .chips strip. */
+.chip.ichip{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.chip .qstate{text-transform:none}
/* On a phone these rows scroll by swipe. On a pointer device lib/hchips.js lets you
click-drag anywhere on the row to pull it along; a grab cursor on rows that actually
diff --git a/frontend/src/sheets.jsx b/frontend/src/sheets.jsx
index be03e49ef..7693c9b2d 100644
--- a/frontend/src/sheets.jsx
+++ b/frontend/src/sheets.jsx
@@ -2310,8 +2310,8 @@ function DayNote({ iso, close }) {
<h3>{fmtDate(iso, true)}</h3>
<div className="muted small" style={{ marginBottom: 12 }}>{t('Life happens. Leave yourself a note, and the missed-day nudge lets this one go.')}</div>
<div className="chips" style={{ margin: '0 0 12px' }}>
- {DAY_NOTE_TAGS.map(k => <button key={k} className={'chip nocap' + (tag === k ? ' on' : '')} aria-pressed={tag === k}
- onClick={() => setTag(tag === k ? null : k)}><Icon name={DAY_NOTE_ICON[k]} /> {t(DAY_NOTE_LABEL[k])}</button>)}
+ {DAY_NOTE_TAGS.map(k => <button key={k} className={'chip nocap ichip' + (tag === k ? ' on' : '')} aria-pressed={tag === k}
+ onClick={() => setTag(tag === k ? null : k)}><Icon name={DAY_NOTE_ICON[k]} />{t(DAY_NOTE_LABEL[k])}</button>)}
</div>
<textarea ref={noteRef} className="input" rows={3} maxLength={NOTE_MAX} value={text}
placeholder={t('Anything else? (optional)')}