Skip to content

Commit

Permalink
adding the notification options to the tray menu (#1076)
Browse files Browse the repository at this point in the history
* adding the notification options to the tray menu

* removing pointless comments

* adding the type 'checkbox' to the new notifications

* improving the notification menu options messages

* even more descriptive:
  • Loading branch information
IsmaelMartinez authored Jan 23, 2024
1 parent 42f64e2 commit 3e7557e
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 11 deletions.
42 changes: 40 additions & 2 deletions app/menus/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ exports = module.exports = (Menus) => ({
{
type: 'separator',
},
getSettingsMenu(Menus)
,
getSettingsMenu(Menus),
getNotificationsMenu(Menus),
{
type: 'separator',
},
Expand Down Expand Up @@ -71,4 +71,42 @@ function getQuitMenu(Menus) {
}
]
};
}

function getNotificationsMenu(Menus) {
return {
label: 'Notifications',
submenu: [
{
label: 'Disable All Notifications',
type: 'checkbox',
checked: Menus.config.disableNotifications,
click: () => Menus.config.disableNotifications = !Menus.config.disableNotifications
},
{
label: 'Disable Meeting Notifications',
type: 'checkbox',
checked: Menus.config.disableMeetingNotifications,
click: () => Menus.config.disableMeetingNotifications = !Menus.config.disableMeetingNotifications
},
{
label: 'Disable Notifications Sound',
type: 'checkbox',
checked: Menus.config.disableNotificationSound,
click: () => Menus.config.disableNotificationSound = !Menus.config.disableNotificationSound
},
{
label: 'Disable Sound when Not Available (e.g: busy, in a call)',
type: 'checkbox',
checked: Menus.config.disableNotificationSoundIfNotAvailable,
click: () => Menus.config.disableNotificationSoundIfNotAvailable = !Menus.config.disableNotificationSoundIfNotAvailable
},
{
label: 'Disables Window Flash on New Notifications',
type: 'checkbox',
checked: Menus.config.disableNotificationWindowFlash,
click: () => Menus.config.disableNotificationWindowFlash = !Menus.config.disableNotificationWindowFlash
}
]
};
}
6 changes: 5 additions & 1 deletion app/menus/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@ exports = module.exports = (app) => ({
submenu: [
{
label: 'Online Documentation',
click: () => shell.openExternal('https://support.office.com/en-us/teams?omkt=en-001'),
click: () => shell.openExternal('https://support.office.com/en-us/teams'),
},
{
label: 'Github Project',
click: () => shell.openExternal('https://github.com/IsmaelMartinez/teams-for-linux'),
},
{
label: 'Microsoft Teams Support',
click:() => shell.openExternal('https://answers.microsoft.com/en-us/msteams/forum'),
},
{type: 'separator'},
{
label: `Version ${app.getVersion()}`,
Expand Down
7 changes: 0 additions & 7 deletions app/notifications/README.md

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "teams-for-linux",
"version": "1.4.4",
"version": "1.4.5",
"main": "app/index.js",
"description": "Unofficial client for Microsoft Teams for Linux",
"homepage": "https://github.com/IsmaelMartinez/teams-for-linux",
Expand Down

0 comments on commit 3e7557e

Please sign in to comment.