Lagt till diagnostic och mer inställningar
This commit is contained in:
@@ -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`,
|
||||
|
||||
Reference in New Issue
Block a user