@@ -1929,6 +1929,8 @@ class TaskMatePanel extends HTMLElement {
19291929 const chore = c && choreById[c.chore_id];
19301930 const bounty = c && c.bounty_id && (this._state.bounties || []).find(b => b.id === c.bounty_id);
19311931 name = (chore && chore.name) || (bounty && bounty.title) || this._t("panel.activity_deleted_chore");
1932+ const t = chore && c.time_id && (chore.times || []).find(x => x.id === c.time_id);
1933+ if (t) name = `${chore.name} (${t.name || t.start})`;
19321934 } else {
19331935 const c = (this._state.pending_reward_claims || []).find(x => x.id === id);
19341936 const reward = c && rewardById[c.reward_id];
@@ -5303,6 +5305,10 @@ class TaskMatePanel extends HTMLElement {
53035305 if (c.bonus_subtask_id && chore) {
53045306 const sub = (chore.bonus_subtasks || []).find(b => b.id === c.bonus_subtask_id);
53055307 if (sub) { choreName = `${chore.name} › ${sub.name}`; chorePoints = sub.points; }
5308+ } else if (c.time_id && chore) {
5309+ // Set times: name the time, as notifications and the sensor do.
5310+ const t = (chore.times || []).find(x => x.id === c.time_id);
5311+ if (t) { choreName = `${chore.name} (${t.name || t.start})`; chorePoints = Number(t.points) || 0; }
53065312 } else if (chore && chore.task_type === "timed" && (c.timed_duration_seconds || 0) > 0) {
53075313 // Timed chores accrue points by elapsed-time rate, so the actual
53085314 // earned points can be lower than chore.points. Mirror sensor.py.
@@ -5854,7 +5860,7 @@ class TaskMatePanel extends HTMLElement {
58545860 </div>
58555861 <div class="tm-setting-row">
58565862 <div class="tm-setting-label">${this._t("panel.screen_time_jar_opens")}<small>${this._t("panel.screen_time_jar_opens_hint")}</small></div>
5857- <div class="tm-st -opens">
5863+ <div class="tm-scr -opens">
58585864 <select class="tm-select" data-setting="screen_time_jar_open_day">
58595865 ${[0, 1, 2, 3, 4, 5, 6].map(d => `<option value="${d}" ${d === openDay ? "selected" : ""}>${this._esc(this._weekdayName(d))}</option>`).join("")}
58605866 </select>
@@ -5866,13 +5872,13 @@ class TaskMatePanel extends HTMLElement {
58665872 const field = `_list:screen_time_devices:${c.id}`;
58675873 const jar = Number(row.jar) || 0;
58685874 return `
5869- <div class="tm-setting-row tm-setting-top tm-st -kid">
5870- <div class="tm-setting-label"><span class="tm-st -name">${this._childAvatar(c)} ${this._esc(c.name)}</span></div>
5875+ <div class="tm-setting-row tm-setting-top tm-scr -kid">
5876+ <div class="tm-setting-label"><span class="tm-scr -name">${this._childAvatar(c)} ${this._esc(c.name)}</span></div>
58715877 <div class="tm-list-body">
5872- <div class="tm-st -head">
5873- <span class="tm-st -balance ${row.active ? "live" : ""}">📺 ${this._esc(this._screenMinutes(row.minutes))}${row.active ? ` · ${this._t("panel.screen_time_watching")}` : ""}${Number(row.allowance) > 0 ? ` · ${this._t("panel.screen_time_allowance_today", { time: this._esc(this._screenMinutes(row.allowance)) })}` : ""}</span>
5874- ${s.screen_time_jar_enabled || jar ? `<span class="tm-st -jar">🫙 ${this._esc(this._screenMinutes(jar))}${jar ? ` <button type="button" class="tm-btn tm-btn-sm" data-act="st-jar-open" data-child="${this._esc(c.id)}">${this._t("panel.screen_time_jar_open_now")}</button>` : ""}</span>` : ""}
5875- <span class="tm-st -adjust">
5878+ <div class="tm-scr -head">
5879+ <span class="tm-scr -balance ${row.active ? "live" : ""}">📺 ${this._esc(this._screenMinutes(row.minutes))}${row.active ? ` · ${this._t("panel.screen_time_watching")}` : ""}${Number(row.allowance) > 0 ? ` · ${this._t("panel.screen_time_allowance_today", { time: this._esc(this._screenMinutes(row.allowance)) })}` : ""}</span>
5880+ ${s.screen_time_jar_enabled || jar ? `<span class="tm-scr -jar">🫙 ${this._esc(this._screenMinutes(jar))}${jar ? ` <button type="button" class="tm-btn tm-btn-sm" data-act="st-jar-open" data-child="${this._esc(c.id)}">${this._t("panel.screen_time_jar_open_now")}</button>` : ""}</span>` : ""}
5881+ <span class="tm-scr -adjust">
58765882 ${[-15, 15, 30].map(m => `<button type="button" class="tm-btn tm-btn-sm" data-act="st-adjust" data-child="${this._esc(c.id)}" data-minutes="${m}">${m > 0 ? "+" : "−"}${Math.abs(m)}</button>`).join("")}
58775883 </span>
58785884 </div>
@@ -5965,7 +5971,7 @@ class TaskMatePanel extends HTMLElement {
59655971 </div>
59665972 ${kids.length < 2 ? `<span class="tm-field-hint">${this._t("panel.sibling_check_need_two")}</span>` : kids.map(checker => `
59675973 <div class="tm-setting-row tm-setting-top">
5968- <div class="tm-setting-label"><span class="tm-st -name">${this._childAvatar(checker)} ${this._t("panel.sibling_check_can_check", { name: this._esc(checker.name) })}</span></div>
5974+ <div class="tm-setting-label"><span class="tm-scr -name">${this._childAvatar(checker)} ${this._t("panel.sibling_check_can_check", { name: this._esc(checker.name) })}</span></div>
59695975 <div class="tm-chip-row">
59705976 ${kids.filter(c => c.id !== checker.id).map(c => {
59715977 const on = Array.isArray(pairs[checker.id]) && pairs[checker.id].includes(c.id);
@@ -8924,8 +8930,12 @@ class TaskMatePanel extends HTMLElement {
89248930 .tm-lib-more small { display: block; color: var(--tm-text-muted); margin-top: 2px; }
89258931 .tm-lib-more .tm-btn ha-icon { --mdc-icon-size: 16px; }
89268932 .tm-toolbar .tm-btn ha-icon { --mdc-icon-size: 16px; vertical-align: -3px; margin-inline-end: 4px; }
8933+ /* Full screen like every other dialog at this width, so it covers the
8934+ phone's bottom bar instead of leaving it dimmed underneath. */
8935+ @media (max-width: 900px) {
8936+ .tm-dialog.tm-lib { height: 100vh; }
8937+ }
89278938 @media (max-width: 760px) {
8928- .tm-dialog.tm-lib { height: calc(100vh - 40px); }
89298939 .tm-lib-main { flex-direction: column; }
89308940 .tm-lib-rail { width: auto; display: flex; gap: 4px; overflow-x: auto; border-inline-end: 0; border-bottom: 1px solid var(--tm-border-soft); flex: none; }
89318941 .tm-lib-cat { width: auto; white-space: nowrap; }
@@ -16786,13 +16796,13 @@ class TaskMatePanel extends HTMLElement {
1678616796 .tm-list-body .tm-allowlist { margin-top: 0; }
1678716797 .tm-list-body .tm-allow-chip { font-family: inherit; }
1678816798 .tm-list-body .tm-field { margin: 0; }
16789- .tm-st -head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
16790- .tm-st -name { font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
16791- .tm-st -balance { background: #e9f6fb; color: #0f4a60; border-radius: 999px; padding: 3px 10px; font-weight: 600; font-size: .85rem; }
16792- .tm-st -balance.live { background: #fdecec; color: #7a1f1f; }
16793- .tm-st -adjust { margin-inline-start: auto; display: inline-flex; gap: 4px; }
16794- .tm-st -jar { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .85rem; }
16795- .tm-st -opens { display: flex; gap: 8px; flex-wrap: wrap; }
16799+ .tm-scr -head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
16800+ .tm-scr -name { font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
16801+ .tm-scr -balance { background: #e9f6fb; color: #0f4a60; border-radius: 999px; padding: 3px 10px; font-weight: 600; font-size: .85rem; }
16802+ .tm-scr -balance.live { background: #fdecec; color: #7a1f1f; }
16803+ .tm-scr -adjust { margin-inline-start: auto; display: inline-flex; gap: 4px; }
16804+ .tm-scr -jar { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .85rem; }
16805+ .tm-scr -opens { display: flex; gap: 8px; flex-wrap: wrap; }
1679616806 .tm-reward-screen { margin-top: 14px; }
1679716807 .tm-bin-preview { display: flex; flex-direction: column; align-items: flex-start; }
1679816808 .tm-bin-preview ul { margin: 8px 0 0; padding-inline-start: 18px; line-height: 1.6; }
@@ -16923,7 +16933,17 @@ class TaskMatePanel extends HTMLElement {
1692316933 .tm-st-d.st-pending { background: var(--tm-warning); border-color: var(--tm-warning); }
1692416934 .tm-st-d.st-missed { background: var(--tm-danger-soft, #fde3e3); border-color: var(--tm-danger, #c4282e); }
1692516935 .tm-st-d.st-now { border-color: var(--tm-accent); }
16926- @media (max-width: 560px) { .tm-st-row { grid-template-columns: minmax(0, 1fr) minmax(104px, 1fr) minmax(104px, 1fr) 52px 28px; } }
16936+ /* Phone: name, points and remove on the first line; From and Until
16937+ share the second line, half each, wide enough for a 12-hour "07:00 AM".
16938+ Every cell has a fixed place, so the layout can't reflow wrongly. */
16939+ @media (max-width: 560px) {
16940+ .tm-st-row { grid-template-columns: calc(50% - 3px) minmax(0, 1fr) 56px 32px; }
16941+ .tm-st-row > :nth-child(1) { grid-area: 1 / 1 / 2 / 3; }
16942+ .tm-st-row > :nth-child(4) { grid-area: 1 / 3 / 2 / 4; }
16943+ .tm-st-row > :nth-child(5) { grid-area: 1 / 4 / 2 / 5; }
16944+ .tm-st-row > :nth-child(2) { grid-area: 2 / 1 / 3 / 2; }
16945+ .tm-st-row > :nth-child(3) { grid-area: 2 / 2 / 3 / 5; }
16946+ }
1692716947
1692816948 .tm-check-row {
1692916949 display: flex; align-items: flex-start; gap: 14px;
0 commit comments