Show a meal's grams in the history list
Same pattern as weigh-ins: "80 g · note" or just "80 g" when there's no note.
This commit is contained in:
@@ -803,6 +803,9 @@
|
||||
const noteEl = li.querySelector(".note");
|
||||
if (ev.type === "weight" && Number.isFinite(ev.weight)) {
|
||||
noteEl.textContent = ev.note ? `${formatWeight(ev.weight)} · ${ev.note}` : formatWeight(ev.weight);
|
||||
} else if (ev.type === "eat" && Number.isFinite(ev.grams) && ev.grams > 0) {
|
||||
const g = `${Math.round(ev.grams)} g`;
|
||||
noteEl.textContent = ev.note ? `${g} · ${ev.note}` : g;
|
||||
} else {
|
||||
noteEl.textContent = ev.note || "";
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
[
|
||||
{ "date": "2026-07-15", "text": "Meals with an amount logged show their grams in the day's history" },
|
||||
{ "date": "2026-07-15", "text": "Every 1-hour gridline on the sleep charts now shows its hour mark" },
|
||||
{ "date": "2026-07-15", "text": "The Sleep chart in the last-N-days card now has 1-hour gridlines too" },
|
||||
{ "date": "2026-07-15", "text": "The Sleep trend chart is taller with 1-hour gridlines, so nearby lines are easier to tell apart" },
|
||||
|
||||
Reference in New Issue
Block a user