show web-push subscription info on demand, and refine docs

This commit is contained in:
2023-12-10 18:43:24 -07:00
parent 0607fad3e5
commit 672abac9a9
5 changed files with 34 additions and 14 deletions

View File

@@ -402,7 +402,10 @@ export default class App extends Vue {
private requestNotificationPermission(): Promise<NotificationPermission> {
return Notification.requestPermission().then((permission) => {
if (permission !== "granted") {
alert("We need notification permission to provide certain features.");
alert(
"Allow this app permission to make notifications for personal reminders." +
" You can adjust them at any time in your settings.",
);
throw new Error("We weren't granted permission.");
}
return permission;