add invite-one-accept screen dedicated to accepting invitations

This commit is contained in:
2024-12-13 13:27:22 -07:00
parent b657dc343a
commit 156950c7f0
11 changed files with 222 additions and 66 deletions

View File

@@ -243,7 +243,7 @@
{{ notifyingNewActivityTime.replace(" ", " ") }}
</div>
<router-link class="pl-4 text-sm text-blue-500" to="/help-notifications">
Troubleshoot your notification setup.
Troubleshoot your notifications.
</router-link>
</div>
<PushNotificationPermission ref="pushNotificationPermission" />
@@ -918,24 +918,6 @@ export default class AccountViewView extends Vue {
// Initialize component state with values from the database or defaults
await this.initializeState();
await this.processIdentity();
this.passkeyExpirationDescription = tokenExpiryTimeDescription();
/**
* Beware! I've seen where this "ready" never resolves.
*/
const registration = await navigator.serviceWorker?.ready;
this.subscription = await registration.pushManager.getSubscription();
if (!this.subscription) {
if (this.notifyingNewActivity || this.notifyingReminder) {
// the app thought there was a subscription but there isn't, so fix the settings
this.turnOffNotifyingFlags();
}
}
// console.log("Got to the end of 'mounted' call in AccountViewView.");
/**
* Beware! I've seen where we never get to this point because "ready" never resolves.
*/
} catch (error) {
// this can happen when running automated tests in dev mode because notifications don't work
console.error(
@@ -957,6 +939,35 @@ export default class AccountViewView extends Vue {
-1,
);
}
try {
/**
* Beware! I've seen where this "ready" never resolves.
*/
const registration = await navigator.serviceWorker?.ready;
this.subscription = await registration.pushManager.getSubscription();
if (!this.subscription) {
if (this.notifyingNewActivity || this.notifyingReminder) {
// the app thought there was a subscription but there isn't, so fix the settings
this.turnOffNotifyingFlags();
}
}
// console.log("Got to the end of 'mounted' call in AccountViewView.");
/**
* Beware! I've seen where we never get to this point because "ready" never resolves.
*/
} catch (error) {
this.$notify(
{
group: "alert",
type: "warning",
title: "Cannot Set Notifications",
text: "This browser does not support notifications. Try Chrome or Safari, or other suggestions on the 'Troubleshoot your notifications' page.",
},
3000,
);
}
this.passkeyExpirationDescription = tokenExpiryTimeDescription();
}
beforeUnmount() {