mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-16 04:41:47 +00:00
change notification priority to show only on linux
This commit is contained in:
@ -2,21 +2,17 @@ const { urgencyLevels, setOption } = require("./utils");
|
|||||||
const is = require("electron-is");
|
const is = require("electron-is");
|
||||||
|
|
||||||
module.exports = (win, options) => [
|
module.exports = (win, options) => [
|
||||||
{
|
...(is.linux() ?
|
||||||
label: "Notification Priority",
|
[{
|
||||||
submenu: urgencyLevels.map(level => ({
|
label: "Notification Priority",
|
||||||
label: level.name,
|
submenu: urgencyLevels.map(level => ({
|
||||||
type: "radio",
|
label: level.name,
|
||||||
checked: options.urgency === level.value,
|
type: "radio",
|
||||||
click: () => setOption(options, "urgency", level.value)
|
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() ?
|
...(is.windows() ?
|
||||||
[{
|
[{
|
||||||
label: "Interactive Notifications",
|
label: "Interactive Notifications",
|
||||||
@ -24,5 +20,11 @@ module.exports = (win, options) => [
|
|||||||
checked: options.interactive,
|
checked: options.interactive,
|
||||||
click: (item) => setOption(options, "interactive", item.checked)
|
click: (item) => setOption(options, "interactive", item.checked)
|
||||||
}] :
|
}] :
|
||||||
[])
|
[]),
|
||||||
|
{
|
||||||
|
label: "Show notification on unpause",
|
||||||
|
type: "checkbox",
|
||||||
|
checked: options.unpauseNotification,
|
||||||
|
click: (item) => setOption(options, "unpauseNotification", item.checked)
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user