catch more errors if something catastrophic happens to encrypted data

This commit is contained in:
2024-12-10 20:02:49 -07:00
parent 8763ade341
commit 6ffbcfa9a1
16 changed files with 238 additions and 70 deletions

View File

@@ -9,7 +9,7 @@
>
<div
v-if="isVisible"
class="fixed z-[100] top-0 inset-x-0 w-full absolute inset-0 h-screen flex flex-col items-center justify-center bg-slate-900/50"
class="fixed z-[100] top-0 inset-x-0 w-full inset-0 h-screen flex flex-col items-center justify-center bg-slate-900/50"
>
<div
class="flex w-11/12 max-w-sm mx-auto mb-3 overflow-hidden bg-white rounded-lg shadow-lg"
@@ -276,9 +276,9 @@ export default class PushNotificationPermission extends Vue {
}
private async askPermission(): Promise<NotificationPermission> {
logConsoleAndDb(
"Requesting permission for notifications: " + JSON.stringify(navigator),
);
// console.log(
// "Requesting permission for notifications: " + JSON.stringify(navigator),
// );
if (
!("serviceWorker" in navigator && navigator.serviceWorker?.controller)
) {
@@ -344,7 +344,7 @@ export default class PushNotificationPermission extends Vue {
},
-1,
);
throw new Error("We weren't granted permission.");
throw new Error("Permission was not granted to this app.");
}
return permission;
},

View File

@@ -90,6 +90,12 @@
>
<div class="flex flex-col items-center">
<fa icon="circle-user" class="fa-fw" />
<!--
We used to say "account", so we'll keep that in the code,
but it isn't accurate because we don't hold anything for them.
We'll say "profile" to the users.
(Or: settings, face, registry, cache, repo, vault... or separate preferences from identity.)
-->
<span class="text-xs mt-1">profile</span>
</div>
</router-link>