Push-Erinnerungen: Widget, Backend-Scheduler, Pushover-Versand jede Minute

This commit is contained in:
2026-05-28 19:11:05 +02:00
parent 7ec2879f73
commit ee2b625ed5
3 changed files with 15 additions and 8 deletions

View File

@@ -1008,10 +1008,11 @@ function PushScheduler({ toast }) {
api('/tools/nachrichten/pushover').then(d=>setHasPushover(!!(d.user_key&&d.app_token))).catch(()=>{});
}, [isOpen]);
// Vorauswahl: jetzt + 1 Stunde
// Vorauswahl: jetzt + 1 Stunde in Lokalzeit
const defaultDt = () => {
const d = new Date(Date.now() + 60*60*1000);
return d.toISOString().slice(0,16);
const p = n => String(n).padStart(2,'0');
return `${d.getFullYear()}-${p(d.getMonth()+1)}-${p(d.getDate())}T${p(d.getHours())}:${p(d.getMinutes())}`;
};
const fmtDt = s => { if (!s) return ''; const d = new Date(s.replace(' ','T')); return isNaN(d)?s:d.toLocaleString('de-DE',{day:'2-digit',month:'2-digit',hour:'2-digit',minute:'2-digit'}); };