fix: Restore "Share Your Info" functionality with correct QR code format

- Fix navigation to use correct QR code routes (contact-qr/contact-qr-scan-full)
- Replace deep link generation with CSV format QR codes
- Remove unused imports and fix notification method calls
- Aligns with master branch behavior for contact sharing

Resolves issue where Share Your Info showed "not implemented" and generated
localhost deep links instead of proper CSV format QR codes.
This commit is contained in:
Matthew Raymer
2025-08-06 06:15:05 +00:00
parent 5ae0535935
commit 607bb50a55
2 changed files with 14 additions and 23 deletions

View File

@@ -151,7 +151,6 @@ import { getContactJwtFromJwtUrl } from "../libs/crypto";
import {
CONTACT_CSV_HEADER,
CONTACT_IMPORT_CONFIRM_URL_PATH_TIME_SAFARI,
generateEndorserJwtUrlForAccount,
register,
setVisibilityUtil,
} from "../libs/endorserServer";
@@ -162,7 +161,6 @@ import { logger } from "../utils/logger";
import { QRScannerFactory } from "@/services/QRScanner/QRScannerFactory";
import { CameraState } from "@/services/QRScanner/types";
import { PlatformServiceMixin } from "@/utils/PlatformServiceMixin";
import { Account } from "@/db/tables/accounts";
import { createNotifyHelpers } from "@/utils/notify";
import {
NOTIFY_QR_INITIALIZATION_ERROR,
@@ -547,8 +545,8 @@ export default class ContactQRScanShow extends Vue {
name: contact.name,
});
this.notify.toast(
"Submitted",
NOTIFY_QR_REGISTRATION_SUBMITTED.message,
undefined,
QR_TIMEOUT_SHORT,
);
@@ -612,20 +610,15 @@ export default class ContactQRScanShow extends Vue {
}
async onCopyUrlToClipboard() {
const account = (await libsUtil.retrieveFullyDecryptedAccount(
this.activeDid,
)) as Account;
const jwtUrl = await generateEndorserJwtUrlForAccount(
account,
this.isRegistered,
this.givenName,
this.profileImageUrl,
true,
);
// Copy the CSV format QR code value instead of generating a deep link
useClipboard()
.copy(jwtUrl)
.copy(this.qrValue)
.then(() => {
this.notify.toast(NOTIFY_QR_URL_COPIED.message, undefined, QR_TIMEOUT_MEDIUM);
this.notify.toast(
"Copied",
NOTIFY_QR_URL_COPIED.message,
QR_TIMEOUT_MEDIUM,
);
});
}