mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-09-13 14:22:25 +03:00
Add Desktop notifications (#252)
* Add notifications * Abide push actions * Handle browsers not having notification support * Ask for notification permission after loading * Make usePermission work without live permission support * Focus message when clicking the notification * make const all caps * Fix usePermission error in Safari * Fix live permissions * Remove userActivity and use document.visibilityState instead * Change setting label to "desktop notifications" * Check for notification permissions in the settings.js
This commit is contained in:
parent
d0b4e092b3
commit
c828dfd596
7 changed files with 174 additions and 15 deletions
|
@ -60,6 +60,7 @@ const cons = {
|
|||
TOGGLE_PEOPLE_DRAWER: 'TOGGLE_PEOPLE_DRAWER',
|
||||
TOGGLE_MEMBERSHIP_EVENT: 'TOGGLE_MEMBERSHIP_EVENT',
|
||||
TOGGLE_NICKAVATAR_EVENT: 'TOGGLE_NICKAVATAR_EVENT',
|
||||
TOGGLE_NOTIFICATIONS: 'TOGGLE_NOTIFICATIONS',
|
||||
},
|
||||
},
|
||||
events: {
|
||||
|
@ -118,6 +119,7 @@ const cons = {
|
|||
PEOPLE_DRAWER_TOGGLED: 'PEOPLE_DRAWER_TOGGLED',
|
||||
MEMBERSHIP_EVENTS_TOGGLED: 'MEMBERSHIP_EVENTS_TOGGLED',
|
||||
NICKAVATAR_EVENTS_TOGGLED: 'NICKAVATAR_EVENTS_TOGGLED',
|
||||
NOTIFICATIONS_TOGGLED: 'NOTIFICATIONS_TOGGLED',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue