Browse Source

Fix: restore newer clipboard service call

pull/154/head
Jose Olarte III 1 week ago
parent
commit
87ebe4ffae
  1. 20
      src/views/ContactQRScanShowView.vue

20
src/views/ContactQRScanShowView.vue

@ -183,7 +183,6 @@ import {
NOTIFY_QR_PROCESSING_ERROR, NOTIFY_QR_PROCESSING_ERROR,
createQRContactAddedMessage, createQRContactAddedMessage,
createQRRegistrationSuccessMessage, createQRRegistrationSuccessMessage,
QR_TIMEOUT_SHORT,
QR_TIMEOUT_STANDARD, QR_TIMEOUT_STANDARD,
QR_TIMEOUT_LONG, QR_TIMEOUT_LONG,
@ -623,18 +622,15 @@ export default class ContactQRScanShow extends Vue {
); );
// Copy the URL to clipboard // Copy the URL to clipboard
useClipboard() const { copyToClipboard } = await import("../services/ClipboardService");
.copy(jwtUrl) await copyToClipboard(jwtUrl);
.then(() => { this.notify.toast(
this.notify.toast( NOTIFY_QR_URL_COPIED.title,
"Copied", NOTIFY_QR_URL_COPIED.message,
NOTIFY_QR_URL_COPIED.message, );
QR_TIMEOUT_MEDIUM,
);
});
} catch (error) { } catch (error) {
logger.error("Failed to generate contact URL:", error); this.$logAndConsole(`Error copying URL to clipboard: ${error}`, true);
this.notify.error("Failed to generate contact URL. Please try again."); this.notify.error("Failed to copy URL to clipboard.");
} }
} }

Loading…
Cancel
Save