mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-13 03:11:46 +00:00
use Electron with ToastXML instead of SnoreToast
* Add support for protocol commands * Remove node-notifier dependency
This commit is contained in:
@ -1,30 +1,40 @@
|
||||
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,
|
||||
type: "radio",
|
||||
checked: options.urgency === level.value,
|
||||
click: () => setOption(options, "urgency", level.value)
|
||||
})),
|
||||
}] :
|
||||
[]),
|
||||
...(is.windows() ?
|
||||
[{
|
||||
label: "Interactive Notifications",
|
||||
type: "checkbox",
|
||||
checked: options.interactive,
|
||||
click: (item) => setOption(options, "interactive", item.checked)
|
||||
}] :
|
||||
[]),
|
||||
module.exports = (_win, options) => [
|
||||
...(is.linux()
|
||||
? [
|
||||
{
|
||||
label: "Notification Priority",
|
||||
submenu: urgencyLevels.map((level) => ({
|
||||
label: level.name,
|
||||
type: "radio",
|
||||
checked: options.urgency === level.value,
|
||||
click: () => setOption(options, "urgency", level.value),
|
||||
})),
|
||||
},
|
||||
]
|
||||
: []),
|
||||
...(is.windows()
|
||||
? [
|
||||
{
|
||||
label: "Interactive Notifications",
|
||||
type: "checkbox",
|
||||
checked: options.interactive,
|
||||
click: (item) => setOption(options, "interactive", item.checked),
|
||||
},
|
||||
{
|
||||
label: "Smaller Interactive Notifications",
|
||||
type: "checkbox",
|
||||
checked: options.smallInteractive,
|
||||
click: (item) => setOption(options, "smallInteractive", item.checked),
|
||||
},
|
||||
]
|
||||
: []),
|
||||
{
|
||||
label: "Show notification on unpause",
|
||||
type: "checkbox",
|
||||
checked: options.unpauseNotification,
|
||||
click: (item) => setOption(options, "unpauseNotification", item.checked)
|
||||
click: (item) => setOption(options, "unpauseNotification", item.checked),
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user