forked from jsnbuchanan/crowd-funder-for-time-pwa
Alert dialog for odd edge-case
This commit is contained in:
13
src/App.vue
13
src/App.vue
@@ -460,7 +460,18 @@ export default class App extends Vue {
|
|||||||
resolve();
|
resolve();
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.error("Push subscription failed:", error, options);
|
console.error(
|
||||||
|
"Subscription or server communication failed:",
|
||||||
|
error,
|
||||||
|
options,
|
||||||
|
);
|
||||||
|
|
||||||
|
// Inform the user about the issue
|
||||||
|
alert(
|
||||||
|
"We encountered an issue setting up push notifications. " +
|
||||||
|
"If you wish to revoke notification permissions, please do so in your browser settings.",
|
||||||
|
);
|
||||||
|
|
||||||
reject(error);
|
reject(error);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -105,6 +105,8 @@ async function getNotificationCount() {
|
|||||||
const messageWithNonceAsUint8Array = self.decodeBase64(identity);
|
const messageWithNonceAsUint8Array = self.decodeBase64(identity);
|
||||||
const nonce = messageWithNonceAsUint8Array.slice(0, 24);
|
const nonce = messageWithNonceAsUint8Array.slice(0, 24);
|
||||||
const message = messageWithNonceAsUint8Array.slice(24, identity.length);
|
const message = messageWithNonceAsUint8Array.slice(24, identity.length);
|
||||||
|
const decoder = new TextDecoder("utf-8");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user