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

@@ -1661,14 +1661,12 @@ export default class AccountViewView extends Vue {
} }
onShareInfo() { onShareInfo() {
// Call the existing logic for sharing info, e.g., open the share dialog // Navigate to QR code sharing page - mobile uses full scan, web uses basic
this.openShareDialog(); if (Capacitor.isNativePlatform()) {
} this.$router.push({ name: "contact-qr-scan-full" });
} else {
// Placeholder for share dialog logic this.$router.push({ name: "contact-qr" });
openShareDialog() { }
// TODO: Implement share dialog logic
this.notify.info("Share dialog not yet implemented.");
} }
onRecheckLimits() { onRecheckLimits() {

View File

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