From 46ac0a1ed3df9d58538ff52b7722c44f17b0770b Mon Sep 17 00:00:00 2001 From: Araxeus Date: Fri, 9 Apr 2021 19:10:20 +0300 Subject: [PATCH] change notification priority to show only on linux --- plugins/notifications/menu.js | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/plugins/notifications/menu.js b/plugins/notifications/menu.js index bfb8c809..3f239909 100644 --- a/plugins/notifications/menu.js +++ b/plugins/notifications/menu.js @@ -2,21 +2,17 @@ const { urgencyLevels, setOption } = require("./utils"); const is = require("electron-is"); module.exports = (win, options) => [ - { - label: "Notification Priority", - submenu: urgencyLevels.map(level => ({ - label: level.name, - type: "radio", - 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.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", @@ -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) + }, ];