Center Icon on ALL notifications

Delete notification on windowclosed
Refactor notifications.utils.setOption
This commit is contained in:
Araxeus
2021-04-09 18:39:57 +03:00
parent 18f041f1c6
commit e6d77c165e
3 changed files with 32 additions and 29 deletions

View File

@ -1,4 +1,4 @@
const { urgencyLevels, setUrgency, setUnpause, setInteractive } = require("./utils");
const { urgencyLevels, setOption } = require("./utils");
const is = require("electron-is");
module.exports = (win, options) => [
@ -8,21 +8,21 @@ module.exports = (win, options) => [
label: level.name,
type: "radio",
checked: options.urgency === level.value,
click: () => setUrgency(options, level.value)
click: () => setOption(options, "urgency", level.value)
})),
},
{
label: "Show notification on unpause",
type: "checkbox",
checked: options.unpauseNotification,
click: (item) => setUnpause(options, item.checked)
click: (item) => setOption(options, "unpauseNotification", item.checked)
},
...(is.windows() ?
[{
label: "Interactive Notifications",
type: "checkbox",
checked: options.interactive,
click: (item) => setInteractive(options, item.checked)
click: (item) => setOption(options, "interactive", item.checked)
}] :
[])
];