feat(timer): Timer/Countdown-Widget mit Presets und Alarm

Countdown-Timer als Single-Instance-Widget mit Preset-System
(max. 5), Web Audio API Alarm und Tab-Titel-Blink bei Ablauf.
Mute-Toggle zum Stummschalten des Alarms.
Z-Index-Hierarchie für Widgets auf 100 angehoben.
This commit is contained in:
2026-03-22 00:32:41 +01:00
parent 32a6fe88dc
commit 2f0b76eb4e
7 changed files with 1002 additions and 7 deletions
+6 -1
View File
@@ -44,12 +44,15 @@ const Notes = {
return note;
});
// Calculator-State beibehalten falls vorhanden
// Calculator- und Timer-State beibehalten falls vorhanden
const existing = await Store.get(this.STORAGE_KEY);
const saveData = { notes: merged };
if (existing && existing.calculator) {
saveData.calculator = existing.calculator;
}
if (existing && existing.timer) {
saveData.timer = existing.timer;
}
await Store.set(this.STORAGE_KEY, saveData);
},
@@ -522,6 +525,8 @@ const Notes = {
await this.create('checklist');
} else if (action === 'calculator') {
Calculator.toggle();
} else if (action === 'timer') {
Timer.toggle();
} else if (action === 'notebook') {
this.openNotebook();
}