Merge branch 'master' into active_did_redux
This commit is contained in:
@@ -108,7 +108,7 @@ import { didInfo, getHeaders } from "../libs/endorserServer";
|
||||
import { UserProfile } from "../libs/partnerServer";
|
||||
import { retrieveAccountDids } from "../libs/util";
|
||||
import { logger } from "../utils/logger";
|
||||
import { useClipboard } from "@vueuse/core";
|
||||
import { copyToClipboard } from "../services/ClipboardService";
|
||||
import { PlatformServiceMixin } from "@/utils/PlatformServiceMixin";
|
||||
import { createNotifyHelpers, TIMEOUTS } from "@/utils/notify";
|
||||
import { NOTIFY_PROFILE_LOAD_ERROR } from "@/constants/notifications";
|
||||
@@ -245,14 +245,16 @@ export default class UserProfileView extends Vue {
|
||||
* Creates a deep link to the profile and copies it to the clipboard
|
||||
* Shows success notification when completed
|
||||
*/
|
||||
onCopyLinkClick() {
|
||||
async onCopyLinkClick() {
|
||||
// Use production URL for sharing to avoid localhost issues in development
|
||||
const deepLink = `${APP_SERVER}/deep-link/user-profile/${this.profile?.rowId}`;
|
||||
useClipboard()
|
||||
.copy(deepLink)
|
||||
.then(() => {
|
||||
this.notify.copied("profile link", TIMEOUTS.STANDARD);
|
||||
});
|
||||
try {
|
||||
await copyToClipboard(deepLink);
|
||||
this.notify.copied("profile link", TIMEOUTS.STANDARD);
|
||||
} catch (error) {
|
||||
this.$logAndConsole(`Error copying profile link: ${error}`, true);
|
||||
this.notify.error("Failed to copy profile link.");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user