2020-04-01 07:47:51 +00:00
|
|
|
// @flow
|
|
|
|
|
2020-07-16 13:59:26 +00:00
|
|
|
import React from 'react';
|
2020-04-01 07:47:51 +00:00
|
|
|
|
2022-10-18 16:21:48 +00:00
|
|
|
import CopyButton from '../../../../base/buttons/CopyButton.web';
|
2020-04-01 07:47:51 +00:00
|
|
|
import { translate } from '../../../../base/i18n';
|
2020-07-16 13:59:26 +00:00
|
|
|
import { getDecodedURI } from '../../../../base/util';
|
2020-04-01 07:47:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Invoked to obtain translated strings.
|
|
|
|
*/
|
|
|
|
t: Function,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The URL of the conference.
|
|
|
|
*/
|
|
|
|
url: string
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Component meant to enable users to copy the conference URL.
|
|
|
|
*
|
|
|
|
* @returns {React$Element<any>}
|
|
|
|
*/
|
|
|
|
function CopyMeetingLinkSection({ t, url }: Props) {
|
|
|
|
return (
|
|
|
|
<>
|
2021-06-10 12:48:44 +00:00
|
|
|
<label htmlFor = { 'copy-button-id' }>{t('addPeople.shareLink')}</label>
|
2020-07-16 13:59:26 +00:00
|
|
|
<CopyButton
|
2021-06-10 12:48:44 +00:00
|
|
|
aria-label = { t('addPeople.copyLink') }
|
2020-07-16 13:59:26 +00:00
|
|
|
className = 'invite-more-dialog-conference-url'
|
|
|
|
displayedText = { getDecodedURI(url) }
|
2021-06-10 12:48:44 +00:00
|
|
|
id = 'copy-button-id'
|
2020-07-16 13:59:26 +00:00
|
|
|
textOnCopySuccess = { t('addPeople.linkCopied') }
|
|
|
|
textOnHover = { t('addPeople.copyLink') }
|
|
|
|
textToCopy = { url } />
|
2020-04-01 07:47:51 +00:00
|
|
|
</>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
export default translate(CopyMeetingLinkSection);
|