stacker.news/components
ekzyis e3c60d1ef8
Sync push subscriptions on every page load (#370)
Most browsers don't support the pushsubscriptionchange event.

We workaround this by saving the current push subscription in IndexedDB so we can check during every page load if the push subscription changed.

If that is the case, we manually sync the push subscription with the server.

However, this solution is not perfect as mentioned in https://medium.com/@madridserginho/how-to-handle-webpush-api-pushsubscriptionchange-event-in-modern-browsers-6e47840d756f which was used for reference:

> This solution is not perfect, the user could lose some push notifications if he doesn’t open the webapp for a long time.

Co-authored-by: ekzyis <ek@stacker.news>
2023-08-07 20:03:34 -05:00
..
accordian-item.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
action-tooltip.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
adv-post-form.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
avatar.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
bookmark.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
bounty-form.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
cancel-button.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
charts.js fix dark mode 2023-08-04 19:21:51 -05:00
comment-edit.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
comment.js only outline eldest new comment ... unset on touch 2023-08-07 09:29:47 -05:00
comment.module.css enhance styling 2023-07-25 13:32:48 -05:00
comments.js implement our own nprogress bar 2023-08-01 21:06:15 -05:00
countdown.js Revert "Revert "shield your eyes; massive, squashed refactor; nextjs/react/react-dom/apollo upgrades"" 2023-07-23 10:08:43 -05:00
cowboy-hat.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
dark-mode.js dark-mode needs to block block 2023-08-04 20:45:12 -05:00
delete.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
discussion-form.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
dont-link-this.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
error-boundary.js upgrade to next-auth 4 (bonus: improve error pages) 2023-07-29 14:38:20 -05:00
fee-button.js fix conditional nextFetchPolicy overriding cache-only on SSR and suppress time hydration warnings 2023-07-31 14:54:30 -05:00
fee-button.module.css fix dark mode 2023-08-04 19:21:51 -05:00
footer-rewards.js fix conditional nextFetchPolicy overriding cache-only on SSR and suppress time hydration warnings 2023-07-31 14:54:30 -05:00
footer.js fix issues with new linting 2023-07-25 09:14:45 -05:00
footer.module.css fix dark mode 2023-08-04 19:21:51 -05:00
form.js highlight notification on back button 2023-08-03 19:14:04 -05:00
form.module.css upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
fund-error.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
header.js fix back button render jitter 2023-08-05 12:56:03 -05:00
header.module.css fix dark mode 2023-08-04 19:21:51 -05:00
info.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
invite.js full powered editing 2022-08-18 13:15:24 -05:00
invoice-status.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
invoice.js slashtags auth 2023-01-18 12:49:20 -06:00
invoice.module.css ready for invoices 2021-05-06 16:15:22 -05:00
item-act.js fix issues with new linting 2023-07-25 09:14:45 -05:00
item-full.js fix nested comment sorting 2023-07-25 19:45:35 -05:00
item-info.js subtle highlight of new comments 2023-08-06 14:18:40 -05:00
item-job.js suppress hydration warnings when relative time is rendered 2023-07-31 09:12:56 -05:00
item.js subtle highlight of new comments 2023-08-06 14:18:40 -05:00
item.module.css more noticable new comment indicator 2023-08-06 14:31:24 -05:00
items.js remove list jitter by initially preferring ssr 2023-08-06 13:04:25 -05:00
items.module.css working search 2022-01-27 13:18:48 -06:00
job-form.js upgrade to prisma 4 2023-07-26 19:18:42 -05:00
layout.js Revert "Revert "shield your eyes; massive, squashed refactor; nextjs/react/react-dom/apollo upgrades"" 2023-07-23 10:08:43 -05:00
layout.module.css Revert "Revert "shield your eyes; massive, squashed refactor; nextjs/react/react-dom/apollo upgrades"" 2023-07-23 10:08:43 -05:00
lightning-auth.js fix conditional nextFetchPolicy overriding cache-only on SSR and suppress time hydration warnings 2023-07-31 14:54:30 -05:00
lightning-auth.module.css Add nostr login (#367) 2023-08-07 19:50:01 -05:00
lightning.js fix issues with new linting 2023-07-25 09:14:45 -05:00
link-form.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
login-button.js Add nostr login (#367) 2023-08-07 19:50:01 -05:00
login.js Add nostr login (#367) 2023-08-07 19:50:01 -05:00
login.module.css more invite work 2021-10-15 13:05:34 -05:00
me.js fix conditional nextFetchPolicy overriding cache-only on SSR and suppress time hydration warnings 2023-07-31 14:54:30 -05:00
modal.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
more-footer.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
nostr-auth.js Add nostr login (#367) 2023-08-07 19:50:01 -05:00
notifications.js remove list jitter by initially preferring ssr 2023-08-06 13:04:25 -05:00
notifications.module.css remove list jitter by initially preferring ssr 2023-08-06 13:04:25 -05:00
page-loading.js Revert "Revert "shield your eyes; massive, squashed refactor; nextjs/react/react-dom/apollo upgrades"" 2023-07-23 10:08:43 -05:00
past-bounties.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
pay-bounty.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
pay-bounty.module.css upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
poll-form.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
poll.js upgrade to next-auth 4 (bonus: improve error pages) 2023-07-29 14:38:20 -05:00
poll.module.css upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
post.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
price.js fix conditional nextFetchPolicy overriding cache-only on SSR and suppress time hydration warnings 2023-07-31 14:54:30 -05:00
qr.js slashtags auth 2023-01-18 12:49:20 -06:00
recent-header.js fix back button behavior on select navigation 2023-07-25 15:29:45 -05:00
related.js more package updates 2023-07-24 19:50:55 -05:00
reply.js fix issues with new linting 2023-07-25 09:14:45 -05:00
reply.module.css upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
root.js improve comment performance 2023-05-06 16:51:17 -05:00
search.js fix back button behavior on select navigation 2023-07-25 15:29:45 -05:00
search.module.css fix dark mode 2023-08-04 19:21:51 -05:00
seo.js fix issues with new linting 2023-07-25 09:14:45 -05:00
serviceworker.js Sync push subscriptions on every page load (#370) 2023-08-07 20:03:34 -05:00
share.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
snl.js fix issues with new linting 2023-07-25 09:14:45 -05:00
sub-select-form.js fix undefined sub on post pre-form 2023-07-25 15:41:46 -05:00
subscribe.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
table-of-contents.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
text.js fix syntax highlighting warnings 2023-07-27 12:10:05 -05:00
text.module.css Revert "Revert "shield your eyes; massive, squashed refactor; nextjs/react/react-dom/apollo upgrades"" 2023-07-23 10:08:43 -05:00
top-header.js fix top header/stat order on back/forward nav 2023-08-06 13:13:32 -05:00
upload.js fix issues with new linting 2023-07-25 09:14:45 -05:00
upvote.js upgrade to next-auth 4 (bonus: improve error pages) 2023-07-29 14:38:20 -05:00
upvote.module.css fix dark mode 2023-08-04 19:21:51 -05:00
usage-header.js fix back button behavior on select navigation 2023-07-25 15:29:45 -05:00
use-data.js remove list jitter by initially preferring ssr 2023-08-06 13:04:25 -05:00
user-header.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
user-header.module.css upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
user-list.js fix top cowboys 2023-08-07 16:26:15 -05:00