This commit is contained in:
Mateusz Gruszczyński
2026-09-16 09:04:43 +02:00
parent 3d69e74319
commit 0437ef7b6f
28 changed files with 1254 additions and 221 deletions
+14
View File
@@ -11,6 +11,19 @@ document.addEventListener('keydown', event => {
document.addEventListener('click', async event => {
const inlineTarget = event.target.closest('[data-temperature-kind]');
if (inlineTarget && !event.target.closest('button')) { beginInlineTemperatureEdit(inlineTarget); return; }
const historyRoute = event.target.closest('a[data-history-route]');
if (historyRoute) {
event.preventDefault();
const hours = historyRoute.dataset.historyHours;
if (hours && $('#historyHours')) $('#historyHours').value = hours;
else if ($('#historyHours')) $('#historyHours').value = '24';
const dialog = historyRoute.closest('dialog');
closeChartPreview(dialog?.querySelector('.history-chart-card.chart-fullscreen-fallback'));
if (dialog?.open) dialog.close();
app.historyTab = 'overview';
showView('history');
return;
}
const button = event.target.closest('button'); if (!button) return;
if (button.dataset.settingsTab) { setSettingsTab(button.dataset.settingsTab); return; }
if (button.dataset.debugFilter) { app.debugFilter = button.dataset.debugFilter; renderDebugOverlay(); return; }
@@ -73,6 +86,7 @@ document.addEventListener('click', async event => {
return;
}
const action = button.dataset.action; if (!action) return;
if (action === 'open-outdoor-history') { await openOutdoorHistory(); return; }
if (action === 'add-cloud-device') {
const cloudId = button.dataset.cloudId; if (!cloudId) return;
button.disabled = true;