Lagt till diagnostic och mer inställningar

This commit is contained in:
2026-06-02 13:25:40 +02:00
parent 229a3c7383
commit 8491fe1386
17 changed files with 498 additions and 17 deletions
+8
View File
@@ -34,7 +34,13 @@ async function notify(title, message) {
// ─── Convenience helpers ─────────────────────────────────────────────────────
function eventEnabled(key) {
const { notifications } = settings.get();
return notifications?.[key] !== false;
}
function recordAdded(provider, zoneId, record) {
if (!eventEnabled('dns_add')) return;
const zoneName = db.getZoneName(provider, zoneId);
return notify(
`DNS Record Added`,
@@ -43,6 +49,7 @@ function recordAdded(provider, zoneId, record) {
}
function recordUpdated(provider, zoneId, oldRecord, newRecord) {
if (!eventEnabled('dns_update')) return;
const zoneName = db.getZoneName(provider, zoneId);
return notify(
`DNS Record Updated`,
@@ -51,6 +58,7 @@ function recordUpdated(provider, zoneId, oldRecord, newRecord) {
}
function recordDeleted(provider, zoneId, record) {
if (!eventEnabled('dns_delete')) return;
const zoneName = db.getZoneName(provider, zoneId);
return notify(
`DNS Record Deleted`,