@ -140,7 +140,7 @@ import { AxiosError } from "axios";
import { Buffer } from "buffer/" ;
import { Buffer } from "buffer/" ;
import QRCodeVue3 from "qr-code-generator-vue3" ;
import QRCodeVue3 from "qr-code-generator-vue3" ;
import { Component , Vue } from "vue-facing-decorator" ;
import { Component , Vue } from "vue-facing-decorator" ;
import { useClipboard } from "@vueuse/core" ;
import { QrcodeStream } from "vue-qrcode-reader" ;
import { QrcodeStream } from "vue-qrcode-reader" ;
import QuickNav from "../components/QuickNav.vue" ;
import QuickNav from "../components/QuickNav.vue" ;
@ -185,7 +185,7 @@ import {
createQRContactAddedMessage ,
createQRContactAddedMessage ,
createQRRegistrationSuccessMessage ,
createQRRegistrationSuccessMessage ,
QR_TIMEOUT_SHORT ,
QR_TIMEOUT_SHORT ,
QR_TIMEOUT_MEDIUM ,
QR_TIMEOUT_STANDARD ,
QR_TIMEOUT_STANDARD ,
QR_TIMEOUT_LONG ,
QR_TIMEOUT_LONG ,
} from "@/constants/notifications" ;
} from "@/constants/notifications" ;
@ -547,8 +547,8 @@ export default class ContactQRScanShow extends Vue {
name : contact . name ,
name : contact . name ,
} ) ;
} ) ;
this . notify . toast (
this . notify . toast (
NOTIFY_QR_REGISTRATION_SUBMITTED . title ,
NOTIFY_QR_REGISTRATION_SUBMITTED . message ,
NOTIFY_QR_REGISTRATION_SUBMITTED . message ,
QR_TIMEOUT_SHORT ,
) ;
) ;
try {
try {
@ -621,24 +621,33 @@ export default class ContactQRScanShow extends Vue {
this . profileImageUrl ,
this . profileImageUrl ,
true ,
true ,
) ;
) ;
useClipboard ( )
try {
. copy ( jwtUrl )
const { copyToClipboard } = await import ( "../services/ClipboardService" ) ;
. then ( ( ) => {
await copyToClipboard ( jwtUrl ) ;
this . notify . toast ( NOTIFY_QR_URL_COPIED . message , QR_TIMEOUT_MEDIUM ) ;
this . notify . toast (
} ) ;
NOTIFY_QR_URL_COPIED . title ,
NOTIFY_QR_URL_COPIED . message ,
) ;
} catch ( error ) {
this . $logAndConsole ( ` Error copying URL to clipboard: ${ error } ` , true ) ;
this . notify . error ( "Failed to copy URL to clipboard." ) ;
}
}
}
toastQRCodeHelp ( ) {
toastQRCodeHelp ( ) {
this . notify . info ( NOTIFY_QR_CODE_HELP . message , QR_TIMEOUT_LONG ) ;
this . notify . info ( NOTIFY_QR_CODE_HELP . message , QR_TIMEOUT_LONG ) ;
}
}
onCopyDidToClipboard ( ) {
async onCopyDidToClipboard ( ) {
/ / t h i s . o n S c a n D e t e c t ( [ { r a w V a l u e : t h i s . q r V a l u e } ] ) ; / / g o o d f o r t e s t i n g
/ / t h i s . o n S c a n D e t e c t ( [ { r a w V a l u e : t h i s . q r V a l u e } ] ) ; / / g o o d f o r t e s t i n g
useClipboard ( )
try {
. copy ( this . activeDid )
const { copyToClipboard } = await import ( "../services/ClipboardService" ) ;
. then ( ( ) => {
await copyToClipboard ( this . activeDid ) ;
this . notify . info ( NOTIFY_QR_DID_COPIED . message , QR_TIMEOUT_LONG ) ;
this . notify . info ( NOTIFY_QR_DID_COPIED . message , QR_TIMEOUT_LONG ) ;
} ) ;
} catch ( error ) {
this . $logAndConsole ( ` Error copying DID to clipboard: ${ error } ` , true ) ;
this . notify . error ( "Failed to copy DID to clipboard." ) ;
}
}
}
openUserNameDialog ( ) {
openUserNameDialog ( ) {