prompt for name when showing info, and provide a "copy" page when remote

This commit is contained in:
2024-08-23 20:06:50 -06:00
parent 431672fd63
commit f2cb7d3ed8
13 changed files with 343 additions and 35 deletions

View File

@@ -1,5 +1,5 @@
<template>
<QuickNav selected="Profile"></QuickNav>
<QuickNav selected="Profile" />
<!-- CONTENT -->
<section id="Content" class="p-6 pb-24 max-w-3xl mx-auto">
<!-- Breadcrumb -->
@@ -109,6 +109,7 @@ import {
CONTACT_URL_PREFIX,
createEndorserJwtForDid,
ENDORSER_JWT_URL_LOCATION,
generateEndorserJwtForAccount,
isDid,
register,
setVisibilityUtil,
@@ -157,7 +158,7 @@ export default class ContactQRScanShow extends Vue {
own: {
name:
(settings?.firstName || "") +
(settings?.lastName ? ` ${settings.lastName}` : ""), // deprecated, pre v 0.1.3
(settings?.lastName ? ` ${settings.lastName}` : ""), // lastName is deprecated, pre v 0.1.3
publicEncKey,
profileImageUrl: settings?.profileImageUrl,
registered: settings?.isRegistered,
@@ -182,7 +183,18 @@ export default class ContactQRScanShow extends Vue {
const vcJwt = await createEndorserJwtForDid(this.activeDid, contactInfo);
const viewPrefix = CONTACT_URL_PREFIX + ENDORSER_JWT_URL_LOCATION;
this.qrValue = viewPrefix + vcJwt;
viewPrefix + vcJwt;
const name =
(settings?.firstName || "") +
(settings?.lastName ? ` ${settings.lastName}` : ""); // lastName is deprecated, pre v 0.1.3
this.qrValue = await generateEndorserJwtForAccount(
account,
!!settings?.isRegistered,
name,
settings?.profileImageUrl as string,
);
}
}