Commit graph

24 commits

Author SHA1 Message Date
binwiederhier 6e95d62726 Cosmetic changess 2023-06-15 22:25:05 -04:00
nimbleghost b197ea3ab6 Use the same notification pipeline everywhere
This means less duplication and `actions` support for all
notifications.
2023-06-15 00:43:18 +02:00
binwiederhier 4dc89f6bc5 Tiny fixes 2023-06-14 13:31:34 -04:00
binwiederhier 966ffe1669 More refactor 2023-06-08 23:09:38 -04:00
binwiederhier d3ac976d05 Remove web-push-(enabled|duration*), change endpoint, other cosmetic changes 2023-06-08 14:30:19 -04:00
nimbleghost 2f5acee798 Call pushManager.subscribe only if enabled 2023-06-08 10:55:11 +02:00
nimbleghost 46798ac322 Make web push toggle global 2023-06-08 10:46:51 +02:00
nimbleghost a8db08c7d4 Use attachment URL for image & add timestamp 2023-06-07 21:57:23 +02:00
nimbleghost 47ad024ec7 Simplify web push UX and updates
- Use a single endpoint
- Use a declarative web push sync hook. This thus handles all edge cases
  that had to be manually handled before: logout, login, account sync,
  etc.
- Simplify UX: browser notifications are always enabled (unless denied),
  web push toggle only shows up if permissions are already granted.
2023-06-07 20:38:21 +02:00
nimbleghost 4944e3ae4b Remove webPushEndpoint from indexeddb
Rely directly on getting it from the browser
2023-06-07 20:38:21 +02:00
nimbleghost 7aa3d8f59b Hide web push toggles if disabled on server 2023-06-07 20:38:21 +02:00
nimbleghost 4648f83669 Format emojis in the service worker directly 2023-06-07 20:38:21 +02:00
binwiederhier e8139ad655 Move web-push-config endpoint to config.js 2023-06-07 20:38:21 +02:00
nimbleghost ff5c854192 Add PWA, service worker and Web Push
- Use new notification request/opt-in flow for push
- Implement unsubscribing
- Implement muting
- Implement emojis in title
- Add iOS specific PWA warning
- Don’t use websockets when web push is enabled
- Fix duplicate notifications
- Implement default web push setting
- Implement changing subscription type
- Implement web push subscription refresh
- Implement web push notification click
2023-06-07 20:38:20 +02:00
nimbleghost 59011c8a32 Make manual eslint fixes
These are safe fixes, more complicated fixes can be done separately
(just disabled those errors for now).

- Reorder declarations to fix `no-use-before-define`
- Rename parameters for `no-shadow`
- Remove unused parameters, functions, imports
- Switch from `++` and `—` to `+= 1` and `-= 1` for `no-unary`
- Use object spreading instead of parameter reassignment in auth utils
- Use `window.location` instead of `location` global
- Use inline JSX strings instead of unescaped values
-
2023-05-24 12:58:48 +02:00
binwiederhier ca5d736a71 Line width 2023-05-23 19:29:47 -04:00
nimbleghost 6f6a2d1f69 Run prettier 2023-05-23 21:13:17 +02:00
Philipp Heckel 4d6c147f24 WIP: DIsplay name for the web app 2022-06-29 15:57:56 -04:00
Philipp Heckel feef15c485 Web app: Show "notifications not supported" alert on HTTP 2022-06-12 16:38:33 -04:00
Philipp Heckel 09336fa1e4 Comments 2022-03-11 15:17:12 -05:00
Philipp Heckel 160c72997f Fix auth base64, fix iPhone things 2022-03-10 18:11:12 -05:00
Philipp Heckel 04ee6b8be2 Embed resources 2022-03-09 15:58:21 -05:00
Philipp Heckel 60980df26b Mute button 2022-03-08 16:56:41 -05:00
Philipp Heckel dc7ca6e405 Support sounds 2022-03-06 00:02:27 -05:00
Renamed from web/src/app/NotificationManager.js (Browse further)