Add widget reply notification setting

This commit is contained in:
rajchales-monito
2026-07-23 23:29:54 +02:00
parent f8874c86ef
commit 4125a512ad
4 changed files with 38 additions and 7 deletions
+5 -2
View File
@@ -219,7 +219,8 @@ function defaultSettings() {
muted: "#647067"
},
desktop: { side: "right", bottomPx: 22, sideOffsetPx: 22, widthPx: 370 },
mobile: { side: "right", bottomPx: 14, sideOffsetPx: 12, widthPx: 340 }
mobile: { side: "right", bottomPx: 14, sideOffsetPx: 12, widthPx: 340 },
notifications: { pulseOnAdminReply: true }
};
}
@@ -614,13 +615,15 @@ function formatAttachment(row) {
}
function formatSite(site) {
const settings = parseJson(site.settings_json, defaultSettings());
settings.notifications = { ...defaultSettings().notifications, ...(settings.notifications || {}) };
return {
id: site.id,
siteKey: site.site_key,
name: site.name,
domain: site.domain,
isOnline: Boolean(site.is_online),
settings: parseJson(site.settings_json, defaultSettings())
settings
};
}