Add widget reply notification setting
This commit is contained in:
@@ -60,6 +60,8 @@ $("#settingsForm").addEventListener("submit", async (event) => {
|
||||
settings.mobile.side = form.get("mobileSide");
|
||||
settings.mobile.bottomPx = Number(form.get("mobileBottom"));
|
||||
settings.mobile.sideOffsetPx = Number(form.get("mobileOffset"));
|
||||
settings.notifications = settings.notifications || {};
|
||||
settings.notifications.pulseOnAdminReply = form.get("pulseOnAdminReply") === "on";
|
||||
await saveSite({ settings, isOnline: state.site.isOnline });
|
||||
});
|
||||
|
||||
@@ -76,6 +78,7 @@ $("#replyForm").addEventListener("submit", async (event) => {
|
||||
method: "POST",
|
||||
body: payload
|
||||
});
|
||||
event.currentTarget.querySelector("textarea[name='message']").value = "";
|
||||
event.currentTarget.reset();
|
||||
state.replyFiles = [];
|
||||
renderReplyAttachments();
|
||||
@@ -243,6 +246,7 @@ function renderSite() {
|
||||
form.mobileSide.value = s.mobile.side || "right";
|
||||
form.mobileBottom.value = s.mobile.bottomPx || 14;
|
||||
form.mobileOffset.value = s.mobile.sideOffsetPx || 12;
|
||||
form.pulseOnAdminReply.checked = s.notifications?.pulseOnAdminReply !== false;
|
||||
}
|
||||
|
||||
function renderConversations() {
|
||||
|
||||
Reference in New Issue
Block a user