Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8fe8f9d417 | |||
| c24d59e672 |
+13
-2
@@ -1711,8 +1711,19 @@
|
||||
logBtn.textContent = "Log";
|
||||
logBtn.addEventListener("click", (e) => {
|
||||
e.stopPropagation();
|
||||
const ev = addEvent("training", "", Date.now(), { exerciseId: ex.id });
|
||||
showSnackbar(`${ex.name} logged`, ev);
|
||||
// Log onto the selected day (at the current time of day), so a session
|
||||
// that was forgotten yesterday can be back-filled from that day's view.
|
||||
const day = selectedDay();
|
||||
const onToday = ymd(day) === ymd(new Date());
|
||||
let at = Date.now();
|
||||
if (!onToday) {
|
||||
const now = new Date();
|
||||
at = new Date(day.getFullYear(), day.getMonth(), day.getDate(),
|
||||
now.getHours(), now.getMinutes(), now.getSeconds()).getTime();
|
||||
}
|
||||
const ev = addEvent("training", "", at, { exerciseId: ex.id });
|
||||
const dayStr = day.toLocaleDateString(undefined, { month: "short", day: "numeric" });
|
||||
showSnackbar(onToday ? `${ex.name} logged` : `${ex.name} logged for ${dayStr}`, ev);
|
||||
});
|
||||
|
||||
row.appendChild(main);
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
[
|
||||
{ "date": "2026-07-15", "text": "Logging a training session while viewing another day puts it on that day (the snackbar tells you where it went)" },
|
||||
{ "date": "2026-07-15", "text": "The Sleep trend yesterday line is orange instead of gray, which was hard to see" },
|
||||
{ "date": "2026-07-15", "text": "The Sleep trend average line is teal now, so it doesn't blend in with today's blue line and its projection" },
|
||||
{ "date": "2026-07-15", "text": "Tapping a day in a chart selects it without jumping down to the history" },
|
||||
{ "date": "2026-07-15", "text": "Meals with an amount logged show their grams in the day's history" },
|
||||
|
||||
+3
-3
@@ -927,11 +927,11 @@ input.switch:checked::after { transform: translateX(18px); }
|
||||
fill: none;
|
||||
}
|
||||
.chart-svg .trend-yesterday {
|
||||
stroke: var(--muted);
|
||||
stroke: var(--eat); /* orange — the gray it had before sank into the grid */
|
||||
stroke-width: 1.5;
|
||||
stroke-linejoin: round;
|
||||
fill: none;
|
||||
opacity: 0.75;
|
||||
opacity: 0.85;
|
||||
}
|
||||
.chart-svg .trend-avg {
|
||||
stroke: var(--weight); /* teal — keeps it apart from today's blue and its blue projected tail */
|
||||
@@ -954,7 +954,7 @@ input.switch:checked::after { transform: translateX(18px); }
|
||||
}
|
||||
.lg.trend-today .sw { background: var(--sleep); }
|
||||
.lg.trend-projected .sw { background: color-mix(in srgb, var(--sleep) 40%, var(--surface)); }
|
||||
.lg.trend-yesterday .sw { background: var(--muted); }
|
||||
.lg.trend-yesterday .sw { background: var(--eat); }
|
||||
.lg.trend-avg .sw { background: var(--weight); }
|
||||
.lg[hidden] { display: none; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user