mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 12:39:53 +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 => {
|
navigator.serviceWorker.getRegistration().then(async registration => {
|
||||||
const subscription = await registration?.pushManager.getSubscription();
|
const subscription = await registration?.pushManager.getSubscription();
|
||||||
if (subscription) {
|
if (subscription) {
|
||||||
|
document.querySelector('.push-settings')?.classList.add('d-none');
|
||||||
document.querySelector('button[data-action="push-enable"]')?.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');
|
document.querySelector('[data-action="push-disable"]')?.classList.remove('d-none');
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue