@@ -405,7 +416,7 @@
contacts can see more details:
click to copy this page info
and see if they can make an introduction. Someone is connected to
@@ -428,7 +439,7 @@
If you'd like an introduction,
share this page with them and ask if they'll tell you more about
about the participants.
@@ -546,7 +557,7 @@ import { useClipboard } from "@vueuse/core";
import { GenericVerifiableCredential } from "../interfaces";
import GiftedDialog from "../components/GiftedDialog.vue";
import QuickNav from "../components/QuickNav.vue";
-import { NotificationIface, USE_DEXIE_DB } from "../constants/app";
+import { APP_SERVER, NotificationIface, USE_DEXIE_DB } from "../constants/app";
import * as databaseUtil from "../db/databaseUtil";
import { db } from "../db/index";
import { logConsoleAndDb } from "../db/databaseUtil";
@@ -593,8 +604,9 @@ export default class ClaimView extends Vue {
veriClaim = serverUtil.BLANK_GENERIC_SERVER_RECORD;
veriClaimDump = "";
veriClaimDidsVisible: { [key: string]: string[] } = {};
- windowLocation = window.location.href;
+ windowDeepLink = window.location.href; // changed in the setup for deep linking
+ APP_SERVER = APP_SERVER;
R = R;
yaml = yaml;
libsUtil = libsUtil;
@@ -671,6 +683,7 @@ export default class ClaimView extends Vue {
5000,
);
}
+ this.windowDeepLink = `${APP_SERVER}/deep-link/claim/${claimId}`;
this.canShare = !!navigator.share;
}
@@ -1006,11 +1019,11 @@ export default class ClaimView extends Vue {
}
onClickShareClaim() {
- this.copyToClipboard("A link to this page", this.windowLocation);
+ this.copyToClipboard("A link to this page", this.windowDeepLink);
window.navigator.share({
title: "Help Connect Me",
text: "I'm trying to find the people who recorded this. Can you help me?",
- url: this.windowLocation,
+ url: this.windowDeepLink,
});
}
diff --git a/src/views/ConfirmGiftView.vue b/src/views/ConfirmGiftView.vue
index 63225259..793df516 100644
--- a/src/views/ConfirmGiftView.vue
+++ b/src/views/ConfirmGiftView.vue
@@ -436,7 +436,7 @@ import { Component, Vue } from "vue-facing-decorator";
import { useClipboard } from "@vueuse/core";
import { RouteLocationNormalizedLoaded, Router } from "vue-router";
import QuickNav from "../components/QuickNav.vue";
-import { NotificationIface, USE_DEXIE_DB } from "../constants/app";
+import { APP_SERVER, NotificationIface, USE_DEXIE_DB } from "../constants/app";
import { db, retrieveSettingsForActiveAccount } from "../db/index";
import { Contact } from "../db/tables/contacts";
import * as databaseUtil from "../db/databaseUtil";
@@ -494,7 +494,7 @@ export default class ConfirmGiftView extends Vue {
veriClaim = serverUtil.BLANK_GENERIC_SERVER_RECORD;
veriClaimDump = "";
veriClaimDidsVisible: { [key: string]: string[] } = {};
- windowLocation = window.location.href;
+ windowLocation = window.location.href; // this is changed to a deep link in the setup
R = R;
yaml = yaml;
@@ -566,6 +566,9 @@ export default class ConfirmGiftView extends Vue {
}
const claimId = decodeURIComponent(pathParam);
+
+ this.windowLocation = APP_SERVER + "/deep-link/confirm-gift/" + claimId;
+
await this.loadClaim(claimId, this.activeDid);
}
@@ -676,12 +679,12 @@ export default class ConfirmGiftView extends Vue {
/**
* Add participant (giver/recipient) name & URL info
*/
- if (this.giveDetails?.agentDid) {
- this.giverName = this.didInfo(this.giveDetails.agentDid);
+ this.giverName = this.didInfo(this.giveDetails?.agentDid);
+ if (this.giveDetails?.agentDid) {
this.urlForNewGive += `&giverDid=${encodeURIComponent(this.giveDetails.agentDid)}&giverName=${encodeURIComponent(this.giverName)}`;
}
+ this.recipientName = this.didInfo(this.giveDetails?.recipientDid);
if (this.giveDetails?.recipientDid) {
- this.recipientName = this.didInfo(this.giveDetails.recipientDid);
this.urlForNewGive += `&recipientDid=${encodeURIComponent(this.giveDetails.recipientDid)}&recipientName=${encodeURIComponent(this.recipientName)}`;
}
diff --git a/src/views/ContactQRScanFullView.vue b/src/views/ContactQRScanFullView.vue
index eba485ca..1ca08edc 100644
--- a/src/views/ContactQRScanFullView.vue
+++ b/src/views/ContactQRScanFullView.vue
@@ -124,12 +124,14 @@ import * as databaseUtil from "../db/databaseUtil";
import {
CONTACT_CSV_HEADER,
CONTACT_IMPORT_CONFIRM_URL_PATH_TIME_SAFARI,
+ generateEndorserJwtUrlForAccount,
setVisibilityUtil,
} from "../libs/endorserServer";
import UserNameDialog from "../components/UserNameDialog.vue";
import { retrieveAccountMetadata } from "../libs/util";
import { PlatformServiceFactory } from "@/services/PlatformServiceFactory";
import { parseJsonField } from "../db/databaseUtil";
+import { Account } from "@/db/tables/accounts";
interface QRScanResult {
rawValue?: string;
@@ -157,6 +159,7 @@ export default class ContactQRScanFull extends Vue {
apiServer = "";
givenName = "";
isRegistered = false;
+ profileImageUrl = "";
qrValue = "";
ETHR_DID_PREFIX = ETHR_DID_PREFIX;
@@ -179,6 +182,7 @@ export default class ContactQRScanFull extends Vue {
this.apiServer = settings.apiServer || "";
this.givenName = settings.firstName || "";
this.isRegistered = !!settings.isRegistered;
+ this.profileImageUrl = settings.profileImageUrl || "";
const account = await retrieveAccountMetadata(this.activeDid);
if (account) {
@@ -588,9 +592,17 @@ export default class ContactQRScanFull extends Vue {
);
}
- onCopyUrlToClipboard() {
+ async onCopyUrlToClipboard() {
+ const account = await libsUtil.retrieveFullyDecryptedAccount(this.activeDid) as Account;
+ const jwtUrl = await generateEndorserJwtUrlForAccount(
+ account,
+ this.isRegistered,
+ this.givenName,
+ this.profileImageUrl,
+ true,
+ );
useClipboard()
- .copy(this.qrValue)
+ .copy(jwtUrl)
.then(() => {
this.$notify(
{
diff --git a/src/views/ContactQRScanShowView.vue b/src/views/ContactQRScanShowView.vue
index 076ee279..675559e7 100644
--- a/src/views/ContactQRScanShowView.vue
+++ b/src/views/ContactQRScanShowView.vue
@@ -177,6 +177,7 @@ import { getContactJwtFromJwtUrl } from "../libs/crypto";
import {
CONTACT_CSV_HEADER,
CONTACT_IMPORT_CONFIRM_URL_PATH_TIME_SAFARI,
+ generateEndorserJwtUrlForAccount,
register,
setVisibilityUtil,
} from "../libs/endorserServer";
@@ -187,6 +188,7 @@ import { logger } from "../utils/logger";
import { QRScannerFactory } from "@/services/QRScanner/QRScannerFactory";
import { CameraState } from "@/services/QRScanner/types";
import { PlatformServiceFactory } from "@/services/PlatformServiceFactory";
+import { Account } from "@/db/tables/accounts";
interface QRScanResult {
rawValue?: string;
@@ -216,6 +218,7 @@ export default class ContactQRScanShow extends Vue {
isRegistered = false;
qrValue = "";
isScanning = false;
+ profileImageUrl = "";
error: string | null = null;
// QR Scanner properties
@@ -253,6 +256,7 @@ export default class ContactQRScanShow extends Vue {
this.hideRegisterPromptOnNewContact =
!!settings.hideRegisterPromptOnNewContact;
this.isRegistered = !!settings.isRegistered;
+ this.profileImageUrl = settings.profileImageUrl || "";
const account = await libsUtil.retrieveAccountMetadata(this.activeDid);
if (account) {
@@ -667,10 +671,17 @@ export default class ContactQRScanShow extends Vue {
});
}
- onCopyUrlToClipboard() {
- //this.onScanDetect([{ rawValue: this.qrValue }]); // good for testing
+ async onCopyUrlToClipboard() {
+ const account = await libsUtil.retrieveFullyDecryptedAccount(this.activeDid) as Account;
+ const jwtUrl = await generateEndorserJwtUrlForAccount(
+ account,
+ this.isRegistered,
+ this.givenName,
+ this.profileImageUrl,
+ true,
+ );
useClipboard()
- .copy(this.qrValue)
+ .copy(jwtUrl)
.then(() => {
this.$notify(
{
diff --git a/src/views/ContactsView.vue b/src/views/ContactsView.vue
index 02f8c6a4..faf63dbf 100644
--- a/src/views/ContactsView.vue
+++ b/src/views/ContactsView.vue
@@ -126,7 +126,6 @@
@@ -55,7 +61,11 @@