feat: Slot-basierter Auto-Refresh mit konfigurierbarer Startzeit

Auto-Refresh nutzt jetzt eine feste Anker-Uhrzeit (refresh_start_time) statt
reinem Intervall-basiertem Driften. Verpasste Slots werden max. 1x aufgeholt.
Bestehendes Intervall-Verhalten bleibt als Fallback erhalten (ohne Startzeit).

Migration: Bestehende Auto-Lagen erhalten 07:00 als Startzeit.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Dieser Commit ist enthalten in:
Claude Dev
2026-04-03 13:14:34 +02:00
Ursprung 68c6666d87
Commit d3e8c0adc7
6 geänderte Dateien mit 93 neuen und 20 gelöschten Zeilen

Datei anzeigen

@@ -821,9 +821,16 @@ const App = {
: '';
}
{ const _e = document.getElementById('meta-refresh-mode'); if (_e) _e.textContent = incident.refresh_mode === 'auto'
? `Auto alle ${App._formatInterval(incident.refresh_interval)}`
: 'Manuell'; }
{ const _e = document.getElementById('meta-refresh-mode'); if (_e) {
if (incident.refresh_mode === 'auto' && incident.refresh_start_time) {
const intervalText = App._formatInterval(incident.refresh_interval);
_e.textContent = `Auto alle ${intervalText} ab ${incident.refresh_start_time} Uhr`;
} else if (incident.refresh_mode === 'auto') {
_e.textContent = `Auto alle ${App._formatInterval(incident.refresh_interval)}`;
} else {
_e.textContent = 'Manuell';
}
} }
// International-Badge
const intlBadge = document.getElementById('intl-badge');
@@ -1517,6 +1524,9 @@ const App = {
type: document.getElementById('inc-type').value,
refresh_mode: document.getElementById('inc-refresh-mode').value,
refresh_interval: interval,
refresh_start_time: document.getElementById('inc-refresh-mode').value === 'auto'
? document.getElementById('inc-refresh-starttime').value || null
: null,
retention_days: parseInt(document.getElementById('inc-retention').value) || 0,
international_sources: document.getElementById('inc-international').checked,
include_telegram: document.getElementById('inc-telegram').checked,
@@ -1914,6 +1924,7 @@ async handleRefresh() {
{ const _e = document.getElementById('inc-type'); if (_e) _e.value = incident.type || 'adhoc'; }
{ const _e = document.getElementById('inc-refresh-mode'); if (_e) _e.value = incident.refresh_mode; }
App._setIntervalFields(incident.refresh_interval);
{ const _e = document.getElementById('inc-refresh-starttime'); if (_e) _e.value = incident.refresh_start_time || '07:00'; }
{ const _e = document.getElementById('inc-retention'); if (_e) _e.value = incident.retention_days; }
{ const _e = document.getElementById('inc-international'); if (_e) _e.checked = incident.international_sources !== false && incident.international_sources !== 0; }
{ const _e = document.getElementById('inc-telegram'); if (_e) _e.checked = !!incident.include_telegram; }
@@ -3214,7 +3225,9 @@ function buildDetailedSourceOverview() {
function toggleRefreshInterval() {
const mode = document.getElementById('inc-refresh-mode').value;
const field = document.getElementById('refresh-interval-field');
const startField = document.getElementById('refresh-starttime-field');
field.classList.toggle('visible', mode === 'auto');
if (startField) startField.classList.toggle('visible', mode === 'auto');
}
function updateIntervalMin() {