fix bad link to project page, fix improper action on invite-add-contact cancel

This commit is contained in:
2024-10-12 20:55:55 -06:00
parent 9c527b27f8
commit 6f880d0df1
12 changed files with 125 additions and 94 deletions

View File

@@ -453,12 +453,23 @@ export default class ContactsView extends Vue {
const payload: JWTPayload =
decodeEndorserJwt(importedInviteJwt).payload;
const registration = payload as VerifiableCredential;
(this.$refs.contactNameDialog as ContactNameDialog).open((name) =>
this.addContact({
did: registration.vc.credentialSubject.agent.identifier,
name: name, // may be undefined if they cancel
registered: true,
}),
(this.$refs.contactNameDialog as ContactNameDialog).open(
"Contact Name",
"",
(name) => {
this.addContact({
did: registration.vc.credentialSubject.agent.identifier,
name: name,
registered: true,
});
},
() => {
this.addContact({
did: registration.vc.credentialSubject.agent.identifier,
name: "(person who invited you)",
registered: true,
});
},
);
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} catch (error: any) {
@@ -945,7 +956,7 @@ export default class ContactsView extends Vue {
}
} catch (error) {
console.error("Error when registering:", error);
let userMessage = "There was an error. See logs for more info.";
let userMessage = "There was an error.";
const serverError = error as AxiosError;
if (serverError.isAxiosError) {
if (