change notification priority to show only on linux

This commit is contained in:
Araxeus
2021-04-09 19:10:20 +03:00
parent e6d77c165e
commit 46ac0a1ed3

View File

@ -2,7 +2,8 @@ const { urgencyLevels, setOption } = require("./utils");
const is = require("electron-is");
module.exports = (win, options) => [
{
...(is.linux() ?
[{
label: "Notification Priority",
submenu: urgencyLevels.map(level => ({
label: level.name,
@ -10,13 +11,8 @@ module.exports = (win, options) => [
checked: options.urgency === level.value,
click: () => setOption(options, "urgency", level.value)
})),
},
{
label: "Show notification on unpause",
type: "checkbox",
checked: options.unpauseNotification,
click: (item) => setOption(options, "unpauseNotification", item.checked)
},
}] :
[]),
...(is.windows() ?
[{
label: "Interactive Notifications",
@ -24,5 +20,11 @@ module.exports = (win, options) => [
checked: options.interactive,
click: (item) => setOption(options, "interactive", item.checked)
}] :
[])
[]),
{
label: "Show notification on unpause",
type: "checkbox",
checked: options.unpauseNotification,
click: (item) => setOption(options, "unpauseNotification", item.checked)
},
];