mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 12:29:54 +01:00
Prevent push enable prompt (inbox) when already subscribed
This commit is contained in:
parent
992f31676c
commit
4457f2ed26
1 changed files with 1 additions and 0 deletions
|
@ -14,6 +14,7 @@ export default (): void => {
|
|||
navigator.serviceWorker.getRegistration().then(async registration => {
|
||||
const subscription = await registration?.pushManager.getSubscription();
|
||||
if (subscription) {
|
||||
document.querySelector('.push-settings')?.classList.add('d-none');
|
||||
document.querySelector('button[data-action="push-enable"]')?.classList.add('d-none');
|
||||
document.querySelector('[data-action="push-disable"]')?.classList.remove('d-none');
|
||||
|
||||
|
|
Loading…
Reference in a new issue