Show reload notification on config update

This commit is contained in:
Shweelan Samson authored and Zaid Abdulla committed 2019-06-05 00:17:36 -07:00
1 parent 6c60ce6457
commit 83dba52e96
7 files changed
+122 -37

No files matched your search

+9 -1
View File
@@ -290,6 +290,14 @@ function renderNotifications(notifs): Child[] {
const notificationElements: Child[] = [];
for (const n of notifs) {
let buttons;
if (n.actions) {
const btns = Object.entries(n.actions).map(([label, onclick]) =>
m("button.primary", { onclick: onclick }, label)
);
if (btns.length) buttons = m("div", { style: "float: right" }, btns);
}
notificationElements.push(
m(
"div.notification",
@@ -309,7 +317,7 @@ function renderNotifications(notifs): Child[] {
},
key: n.timestamp
},
n.message
m("div", buttons, n.message)
)
);
}