profile links to window.location.origin instead of iris.to

This commit is contained in:
Martti Malmi 2022-02-23 14:46:15 +02:00
parent 1afe5c6672
commit e8cd4cce00
3 changed files with 4 additions and 4 deletions

View File

@ -2014,7 +2014,7 @@ export default {
},
getProfileLink(pub) {
return `https://iris.to/profile/${ encodeURIComponent(pub)}`;
return `${window.location.origin}/profile/${ encodeURIComponent(pub)}`;
},
isElectron,

View File

@ -146,7 +146,7 @@ class Profile extends View {
` : ''}
${this.isMyProfile ? '' : html`<${FollowButton} key=${`${this.props.id}follow`} id=${this.props.id}/>`}
<button onClick=${() => route(`/chat/${ this.props.id}`)}>${t('send_message')}</button>
<${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}/>
<button onClick=${() => $(this.qrRef.current).toggle()}>${t('show_qr_code')}</button>
${this.isMyProfile ? '' : html`
<button class="show-settings" onClick=${() => this.onClickSettings()}>${t('settings')}</button>
@ -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",

View File

@ -73,7 +73,7 @@ class Store extends View {
${followable ? html`<${FollowButton} id=${user}/>` : ''}
<button onClick=${() => route(`/chat/${ user}`)}>${t('send_message')}</button>
${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}/>
`}
</div>
</div>