From e8cd4cce008e3b80a5806705bfe8c2a9f8c2216e Mon Sep 17 00:00:00 2001 From: Martti Malmi Date: Wed, 23 Feb 2022 14:46:15 +0200 Subject: [PATCH] profile links to window.location.origin instead of iris.to --- src/js/Helpers.js | 2 +- src/js/views/Profile.js | 4 ++-- src/js/views/Store.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/js/Helpers.js b/src/js/Helpers.js index 4b0d6648..8ff7864a 100644 --- a/src/js/Helpers.js +++ b/src/js/Helpers.js @@ -2014,7 +2014,7 @@ export default { }, getProfileLink(pub) { - return `https://iris.to/profile/${ encodeURIComponent(pub)}`; + return `${window.location.origin}/profile/${ encodeURIComponent(pub)}`; }, isElectron, diff --git a/src/js/views/Profile.js b/src/js/views/Profile.js index c7931b72..7f897548 100644 --- a/src/js/views/Profile.js +++ b/src/js/views/Profile.js @@ -146,7 +146,7 @@ class Profile extends View { ` : ''} ${this.isMyProfile ? '' : html`<${FollowButton} key=${`${this.props.id}follow`} id=${this.props.id}/>`} - <${CopyButton} key=${`${this.props.id}copy`} text=${t('copy_link')} title=${this.state.name} copyStr=${`https://iris.to${ window.location.pathname}`}/> + <${CopyButton} key=${`${this.props.id}copy`} text=${t('copy_link')} title=${this.state.name} copyStr=${window.location.href}/> ${this.isMyProfile ? '' : html` @@ -306,7 +306,7 @@ class Profile extends View { } qrCodeEl.empty(); new QRCode(qrCodeEl.get(0), { - text: `https://iris.to/${ window.location.pathname}`, + text: window.location.href, width: 300, height: 300, colorDark : "#000000", diff --git a/src/js/views/Store.js b/src/js/views/Store.js index 5e961d21..53f5a4ea 100644 --- a/src/js/views/Store.js +++ b/src/js/views/Store.js @@ -73,7 +73,7 @@ class Store extends View { ${followable ? html`<${FollowButton} id=${user}/>` : ''} ${uuid ? '' : html` - <${CopyButton} text=${t('copy_link')} title=${this.state.name} copyStr=${`https://iris.to/${ window.location.pathname}`}/> + <${CopyButton} text=${t('copy_link')} title=${this.state.name} copyStr=${window.location.href}/> `}