fix(prejoin): Show decoded version of meeting uri
This commit is contained in:
parent
b85cd2348f
commit
ef0af1a8c0
|
@ -6,7 +6,7 @@ import { getCurrentConferenceUrl } from '../../../connection';
|
|||
import { translate } from '../../../i18n';
|
||||
import { Icon, IconCopy, IconCheck } from '../../../icons';
|
||||
import { connect } from '../../../redux';
|
||||
import { copyText } from '../../../util';
|
||||
import { copyText, getDecodedURI } from '../../../util';
|
||||
|
||||
type Props = {
|
||||
|
||||
|
@ -156,7 +156,7 @@ class CopyMeetingUrl extends Component<Props, State> {
|
|||
className = { `url ${showLinkCopied ? 'done' : ''}` }
|
||||
onClick = { _copyUrl } >
|
||||
<div className = 'copy-meeting-text'>
|
||||
{ !showCopyLink && !showLinkCopied && url }
|
||||
{ !showCopyLink && !showLinkCopied && getDecodedURI(url) }
|
||||
{ showCopyLink && t('prejoin.copyAndShare') }
|
||||
{ showLinkCopied && t('prejoin.linkCopied') }
|
||||
</div>
|
||||
|
|
|
@ -591,3 +591,13 @@ export function addHashParamsToURL(url: URL, hashParamsToAdd: Object = {}) {
|
|||
|
||||
return url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the decoded URI.
|
||||
*
|
||||
* @param {string} uri - The URI to decode.
|
||||
* @returns {string}
|
||||
*/
|
||||
export function getDecodedURI(uri: string) {
|
||||
return decodeURI(uri.replace(/^https?:\/\//i, ''));
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ import React, { useState } from 'react';
|
|||
|
||||
import { translate } from '../../../../base/i18n';
|
||||
import { Icon, IconCheck, IconCopy } from '../../../../base/icons';
|
||||
import { copyText } from '../../../../base/util';
|
||||
import { copyText, getDecodedURI } from '../../../../base/util';
|
||||
|
||||
|
||||
type Props = {
|
||||
|
@ -82,7 +82,7 @@ function CopyMeetingLinkSection({ t, url }: Props) {
|
|||
);
|
||||
}
|
||||
|
||||
const displayUrl = decodeURI(url.replace(/^https?:\/\//i, ''));
|
||||
const displayUrl = getDecodedURI(url);
|
||||
|
||||
return (
|
||||
<>
|
||||
|
|
Loading…
Reference in New Issue