forked from jsnbuchanan/crowd-funder-for-time-pwa
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:
@@ -1661,14 +1661,12 @@ export default class AccountViewView extends Vue {
|
||||
}
|
||||
|
||||
onShareInfo() {
|
||||
// Call the existing logic for sharing info, e.g., open the share dialog
|
||||
this.openShareDialog();
|
||||
}
|
||||
|
||||
// Placeholder for share dialog logic
|
||||
openShareDialog() {
|
||||
// TODO: Implement share dialog logic
|
||||
this.notify.info("Share dialog not yet implemented.");
|
||||
// Navigate to QR code sharing page - mobile uses full scan, web uses basic
|
||||
if (Capacitor.isNativePlatform()) {
|
||||
this.$router.push({ name: "contact-qr-scan-full" });
|
||||
} else {
|
||||
this.$router.push({ name: "contact-qr" });
|
||||
}
|
||||
}
|
||||
|
||||
onRecheckLimits() {
|
||||
|
||||
@@ -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,
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user