Jump to the middle; bold jump arrows; Chicago time; demo hours 6 AM-9 PM
- Jump sheet: Top / Middle / Bottom with the Card fields arrows; the Jump button uses the same bold arrows. - Container timezone defaults to America/Chicago (TZ in Dockerfile/compose). - Demo worker follows its own business hours (Demo.BusinessHours, default 06:00-21:00 every day) with the midnight pitstop; the simulated cycle in the browser shows the real worker's next run.
This commit is contained in:
1 parent
b0f700928e
commit
4cc810adf5
8 files changed
+39
-16
No files matched your search
+15
-7
@@ -163,12 +163,19 @@
|
||||
sheet.appendChild(list);
|
||||
}
|
||||
|
||||
const ends = el('div', 'xf-actions');
|
||||
const top = el('button', 'xf-cancel', '↑ Top'); top.type = 'button';
|
||||
top.onclick = () => { close(); window.scrollTo({ top: 0, behavior: 'smooth' }); };
|
||||
const bottom = el('button', 'xf-cancel', '↓ Bottom'); bottom.type = 'button';
|
||||
bottom.onclick = () => { close(); window.scrollTo({ top: document.documentElement.scrollHeight, behavior: 'smooth' }); };
|
||||
ends.appendChild(top); ends.appendChild(bottom);
|
||||
// Top / Middle / Bottom (same bold arrows as Card fields)
|
||||
const ends = el('div', 'xf-actions jump-ends');
|
||||
const svg = d => '<svg viewBox="0 0 16 16" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round">' + d + '</svg>';
|
||||
const end = (icon, label, y) => {
|
||||
const b = el('button', 'xf-cancel jump-end'); b.type = 'button';
|
||||
b.innerHTML = svg(icon); b.appendChild(el('span', null, label));
|
||||
b.onclick = () => { close(); window.scrollTo({ top: y(), behavior: 'smooth' }); };
|
||||
ends.appendChild(b);
|
||||
};
|
||||
const maxY = () => document.documentElement.scrollHeight - window.innerHeight;
|
||||
end('<path d="M8 13V3M3.5 7.5 8 3l4.5 4.5"/>', 'Top', () => 0);
|
||||
end('<path d="M4.5 1.8 8 5l3.5-3.2M4.5 14.2 8 11l3.5 3.2M1.8 8h12.4"/>', 'Middle', () => Math.round(maxY() / 2));
|
||||
end('<path d="M8 3v10M3.5 8.5 8 13l4.5-4.5"/>', 'Bottom', () => maxY());
|
||||
sheet.appendChild(ends);
|
||||
|
||||
document.body.appendChild(backdrop);
|
||||
@@ -190,7 +197,8 @@
|
||||
function init() {
|
||||
btn = el('button', 'jump-btn');
|
||||
btn.type = 'button'; btn.title = 'Jump to a device or section'; btn.setAttribute('aria-label', 'Jump to a device or section');
|
||||
btn.innerHTML = '<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 3v18M12 3 7.5 7.5M12 3l4.5 4.5M12 21l-4.5-4.5M12 21l4.5-4.5" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"/></svg><span>Jump</span>';
|
||||
// up + down arrows, drawn like the Card fields arrows
|
||||
btn.innerHTML = '<svg viewBox="0 0 24 16" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><path d="M6 13V3M1.5 7.5 6 3l4.5 4.5"/><path d="M18 3v10M13.5 8.5 18 13l4.5-4.5"/></svg><span>Jump</span>';
|
||||
btn.onclick = open;
|
||||
btn.hidden = true;
|
||||
document.body.appendChild(btn);
|
||||
|
||||
Reference in new issue
Block a user