ref(ui-components) Use new Dialog component (#12306)

Convert some files to TS
This commit is contained in:
Robert Pintilii 2022-10-07 12:16:41 +03:00 committed by GitHub
parent be25ad855f
commit 25bd824621
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 113 additions and 99 deletions

View File

@ -46,6 +46,8 @@
} }
.feedback-dialog { .feedback-dialog {
margin-bottom: 5px;
.details { .details {
textarea { textarea {
min-height: 100px; min-height: 100px;

View File

@ -1,3 +1,7 @@
.share-audio-dialog-container {
max-height: none;
}
.share-audio-dialog { .share-audio-dialog {
.share-audio-animation { .share-audio-animation {
width: 100%; width: 100%;

View File

@ -1,7 +1,21 @@
/* eslint-disable lines-around-comment */
import ChatPrivacyDialog from '../../chat/components/web/ChatPrivacyDialog'; import ChatPrivacyDialog from '../../chat/components/web/ChatPrivacyDialog';
import DisplayNamePrompt from '../../display-name/components/web/DisplayNamePrompt'; import DisplayNamePrompt from '../../display-name/components/web/DisplayNamePrompt';
import EmbedMeetingDialog from '../../embed-meeting/components/EmbedMeetingDialog'; import EmbedMeetingDialog from '../../embed-meeting/components/EmbedMeetingDialog';
// @ts-ignore
import FeedbackDialog from '../../feedback/components/FeedbackDialog.web';
import AddPeopleDialog from '../../invite/components/add-people-dialog/web/AddPeopleDialog';
import PremiumFeatureDialog from '../../jaas/components/web/PremiumFeatureDialog';
import KeyboardShortcutsDialog from '../../keyboard-shortcuts/components/web/KeyboardShortcutsDialog'; import KeyboardShortcutsDialog from '../../keyboard-shortcuts/components/web/KeyboardShortcutsDialog';
// @ts-ignore
import StartLiveStreamDialog from '../../recording/components/LiveStream/web/StartLiveStreamDialog';
// @ts-ignore
import StopLiveStreamDialog from '../../recording/components/LiveStream/web/StopLiveStreamDialog';
// @ts-ignore
import StartRecordingDialog from '../../recording/components/Recording/web/StartRecordingDialog';
// @ts-ignore
import StopRecordingDialog from '../../recording/components/Recording/web/StopRecordingDialog';
import ShareAudioDialog from '../../screen-share/components/ShareAudioDialog';
import MiddlewareRegistry from '../redux/MiddlewareRegistry'; import MiddlewareRegistry from '../redux/MiddlewareRegistry';
import { OPEN_DIALOG } from './actionTypes'; import { OPEN_DIALOG } from './actionTypes';
@ -9,7 +23,9 @@ import { OPEN_DIALOG } from './actionTypes';
// ! IMPORTANT - This whole middleware is only needed for the transition from from @atlaskit dialog to our component. // ! IMPORTANT - This whole middleware is only needed for the transition from from @atlaskit dialog to our component.
// ! It should be removed when the transition is over. // ! It should be removed when the transition is over.
const NEW_DIALOG_LIST = [ KeyboardShortcutsDialog, ChatPrivacyDialog, DisplayNamePrompt, EmbedMeetingDialog ]; const NEW_DIALOG_LIST = [ KeyboardShortcutsDialog, ChatPrivacyDialog, DisplayNamePrompt, EmbedMeetingDialog,
FeedbackDialog, AddPeopleDialog, PremiumFeatureDialog, StartLiveStreamDialog, StopLiveStreamDialog,
StartRecordingDialog, StopRecordingDialog, ShareAudioDialog ];
// This function is necessary while the transition from @atlaskit dialog to our component is ongoing. // This function is necessary while the transition from @atlaskit dialog to our component is ongoing.
const isNewDialog = (component: any) => NEW_DIALOG_LIST.some(comp => comp === component); const isNewDialog = (component: any) => NEW_DIALOG_LIST.some(comp => comp === component);

View File

@ -313,7 +313,7 @@ export function showNoDataFromSourceVideoError(jitsiTrack: any) {
* shareOptions: Object * shareOptions: Object
* }} * }}
*/ */
export function toggleScreensharing(enabled: boolean, audioOnly = false, export function toggleScreensharing(enabled: boolean | undefined, audioOnly = false,
ignoreDidHaveVideo = false, shareOptions = {}) { ignoreDidHaveVideo = false, shareOptions = {}) {
return { return {
type: TOGGLE_SCREENSHARING, type: TOGGLE_SCREENSHARING,

View File

@ -177,6 +177,7 @@ interface DialogProps {
translationKey?: string; translationKey?: string;
}; };
children?: ReactElement | ReactElement[]; children?: ReactElement | ReactElement[];
className?: string;
description?: string; description?: string;
ok?: { ok?: {
disabled?: boolean; disabled?: boolean;
@ -193,6 +194,7 @@ interface DialogProps {
const Dialog = ({ const Dialog = ({
cancel = { translationKey: 'dialog.Cancel' }, cancel = { translationKey: 'dialog.Cancel' },
children, children,
className,
description, description,
ok = { translationKey: 'dialog.Ok' }, ok = { translationKey: 'dialog.Ok' },
onCancel, onCancel,
@ -237,7 +239,7 @@ const Dialog = ({
aria-describedby = { description } aria-describedby = { description }
aria-labelledby = { title ?? t(titleKey ?? '') } aria-labelledby = { title ?? t(titleKey ?? '') }
aria-modal = { true } aria-modal = { true }
className = { cx(classes.modal, isUnmounting && 'unmount', size) } className = { cx(classes.modal, isUnmounting && 'unmount', size, className) }
role = 'dialog'> role = 'dialog'>
<div className = { classes.header }> <div className = { classes.header }>
<p className = { classes.title }>{title ?? t(titleKey ?? '')}</p> <p className = { classes.title }>{title ?? t(titleKey ?? '')}</p>
@ -256,6 +258,7 @@ const Dialog = ({
{!ok.hidden && <Button {!ok.hidden && <Button
accessibilityLabel = { t(ok.translationKey ?? '') } accessibilityLabel = { t(ok.translationKey ?? '') }
disabled = { ok.disabled } disabled = { ok.disabled }
id = 'modal-dialog-ok-button'
labelKey = { ok.translationKey } labelKey = { ok.translationKey }
onClick = { submit } />} onClick = { submit } />}
</div> </div>

View File

@ -9,10 +9,10 @@ import {
createFeedbackOpenEvent, createFeedbackOpenEvent,
sendAnalytics sendAnalytics
} from '../../analytics'; } from '../../analytics';
import { Dialog } from '../../base/dialog';
import { isMobileBrowser } from '../../base/environment/utils'; import { isMobileBrowser } from '../../base/environment/utils';
import { translate } from '../../base/i18n'; import { translate } from '../../base/i18n';
import { connect } from '../../base/redux'; import { connect } from '../../base/redux';
import Dialog from '../../base/ui/components/web/Dialog';
import Input from '../../base/ui/components/web/Input'; import Input from '../../base/ui/components/web/Input';
import { cancelFeedback, submitFeedback } from '../actions'; import { cancelFeedback, submitFeedback } from '../actions';
@ -250,9 +250,10 @@ class FeedbackDialog extends Component<Props, State> {
return ( return (
<Dialog <Dialog
okKey = 'dialog.Submit' ok = {{
translationKey: 'dialog.Submit'
}}
onCancel = { this._onCancel } onCancel = { this._onCancel }
onDialogRef = { this._onScrollTop }
onSubmit = { this._onSubmit } onSubmit = { this._onSubmit }
titleKey = 'feedback.rateExperience'> titleKey = 'feedback.rateExperience'>
<div className = 'feedback-dialog'> <div className = 'feedback-dialog'>

View File

@ -1,17 +1,24 @@
// @flow /* eslint-disable lines-around-comment */
import React, { useEffect } from 'react'; import React, { useEffect } from 'react';
import { WithTranslation } from 'react-i18next';
import { createInviteDialogEvent, sendAnalytics } from '../../../../analytics'; import { createInviteDialogEvent } from '../../../../analytics/AnalyticsEvents';
import { getInviteURL } from '../../../../base/connection'; import { sendAnalytics } from '../../../../analytics/functions';
import { Dialog } from '../../../../base/dialog'; import { IState } from '../../../../app/types';
import { translate } from '../../../../base/i18n'; import { getInviteURL } from '../../../../base/connection/functions';
import { translate } from '../../../../base/i18n/functions';
import { JitsiRecordingConstants } from '../../../../base/lib-jitsi-meet'; import { JitsiRecordingConstants } from '../../../../base/lib-jitsi-meet';
import { connect } from '../../../../base/redux'; import { connect } from '../../../../base/redux/functions';
import Dialog from '../../../../base/ui/components/web/Dialog';
// @ts-ignore
import { isDynamicBrandingDataLoaded } from '../../../../dynamic-branding/functions.any'; import { isDynamicBrandingDataLoaded } from '../../../../dynamic-branding/functions.any';
// @ts-ignore
import EmbedMeetingTrigger from '../../../../embed-meeting/components/EmbedMeetingTrigger'; import EmbedMeetingTrigger from '../../../../embed-meeting/components/EmbedMeetingTrigger';
// @ts-ignore
import { isVpaasMeeting } from '../../../../jaas/functions'; import { isVpaasMeeting } from '../../../../jaas/functions';
// @ts-ignore
import { getActiveSession } from '../../../../recording'; import { getActiveSession } from '../../../../recording';
// @ts-ignore
import { updateDialInNumbers } from '../../../actions'; import { updateDialInNumbers } from '../../../actions';
import { import {
_getDefaultPhoneNumber, _getDefaultPhoneNumber,
@ -21,95 +28,94 @@ import {
isDialOutEnabled, isDialOutEnabled,
isSharingEnabled, isSharingEnabled,
sharingFeatures sharingFeatures
// @ts-ignore
} from '../../../functions'; } from '../../../functions';
// @ts-ignore
import CopyMeetingLinkSection from './CopyMeetingLinkSection'; import CopyMeetingLinkSection from './CopyMeetingLinkSection';
import DialInLimit from './DialInLimit'; import DialInLimit from './DialInLimit';
// @ts-ignore
import DialInSection from './DialInSection'; import DialInSection from './DialInSection';
// @ts-ignore
import InviteByEmailSection from './InviteByEmailSection'; import InviteByEmailSection from './InviteByEmailSection';
// @ts-ignore
import InviteContactsSection from './InviteContactsSection'; import InviteContactsSection from './InviteContactsSection';
// @ts-ignore
import LiveStreamSection from './LiveStreamSection'; import LiveStreamSection from './LiveStreamSection';
declare var interfaceConfig: Object; interface Props extends WithTranslation {
type Props = {
/** /**
* The object representing the dialIn feature. * The object representing the dialIn feature.
*/ */
_dialIn: Object, _dialIn: any;
/**
* Whether or not embed meeting should be visible.
*/
_embedMeetingVisible: boolean,
/** /**
* Whether or not dial in number should be visible. * Whether or not dial in number should be visible.
*/ */
_dialInVisible: boolean, _dialInVisible: boolean;
/**
* Whether or not url sharing button should be visible.
*/
_urlSharingVisible: boolean,
/** /**
* Whether or not email sharing features should be visible. * Whether or not email sharing features should be visible.
*/ */
_emailSharingVisible: boolean, _emailSharingVisible: boolean;
/**
* Whether or not embed meeting should be visible.
*/
_embedMeetingVisible: boolean;
/** /**
* The meeting invitation text. * The meeting invitation text.
*/ */
_invitationText: string, _invitationText: string;
/** /**
* The custom no new-lines meeting invitation text for iOS default email. * The custom no new-lines meeting invitation text for iOS default email.
* Needed because of this mailto: iOS issue: https://developer.apple.com/forums/thread/681023. * Needed because of this mailto: iOS issue: https://developer.apple.com/forums/thread/681023.
*/ */
_invitationTextiOS: string, _invitationTextiOS: string;
/** /**
* An alternate app name to be displayed in the email subject. * An alternate app name to be displayed in the email subject.
*/ */
_inviteAppName: ?string, _inviteAppName?: string;
/** /**
* Whether or not invite contacts should be visible. * Whether or not invite contacts should be visible.
*/ */
_inviteContactsVisible: boolean, _inviteContactsVisible: boolean;
/** /**
* The current url of the conference to be copied onto the clipboard. * The current url of the conference to be copied onto the clipboard.
*/ */
_inviteUrl: string, _inviteUrl: string;
/** /**
* Whether or not the current meeting belongs to a JaaS user. * Whether or not the current meeting belongs to a JaaS user.
*/ */
_isVpaasMeeting: boolean, _isVpaasMeeting: boolean;
/** /**
* The current known URL for a live stream in progress. * The current known URL for a live stream in progress.
*/ */
_liveStreamViewURL: string, _liveStreamViewURL: string;
/** /**
* The default phone number. * The default phone number.
*/ */
_phoneNumber: ?string, _phoneNumber?: string;
/** /**
* Invoked to obtain translated strings. * Whether or not url sharing button should be visible.
*/ */
t: Function, _urlSharingVisible: boolean;
/** /**
* Method to update the dial in numbers. * Method to update the dial in numbers.
*/ */
updateNumbers: Function updateNumbers: Function;
}; }
/** /**
* Invite More component. * Invite More component.
@ -163,11 +169,9 @@ function AddPeopleDialog({
return ( return (
<Dialog <Dialog
cancelKey = { 'dialog.close' } cancel = {{ hidden: true }}
hideCancelButton = { true } ok = {{ hidden: true }}
submitDisabled = { true } titleKey = 'addPeople.inviteMorePrompt'>
titleKey = 'addPeople.inviteMorePrompt'
width = { 'small' }>
<div className = 'invite-more-dialog'> <div className = 'invite-more-dialog'>
{ _inviteContactsVisible && <InviteContactsSection /> } { _inviteContactsVisible && <InviteContactsSection /> }
{_urlSharingVisible ? <CopyMeetingLinkSection url = { _inviteUrl } /> : null} {_urlSharingVisible ? <CopyMeetingLinkSection url = { _inviteUrl } /> : null}
@ -207,7 +211,7 @@ function AddPeopleDialog({
* @private * @private
* @returns {Props} * @returns {Props}
*/ */
function mapStateToProps(state, ownProps) { function mapStateToProps(state: IState, ownProps: Partial<Props>) {
const currentLiveStreamingSession const currentLiveStreamingSession
= getActiveSession(state, JitsiRecordingConstants.mode.STREAM); = getActiveSession(state, JitsiRecordingConstants.mode.STREAM);
const { iAmRecorder, inviteAppName } = state['features/base/config']; const { iAmRecorder, inviteAppName } = state['features/base/config'];
@ -215,7 +219,7 @@ function mapStateToProps(state, ownProps) {
const dialOutEnabled = isDialOutEnabled(state); const dialOutEnabled = isDialOutEnabled(state);
const hideInviteContacts = iAmRecorder || (!addPeopleEnabled && !dialOutEnabled); const hideInviteContacts = iAmRecorder || (!addPeopleEnabled && !dialOutEnabled);
const dialIn = state['features/invite']; const dialIn = state['features/invite'];
const phoneNumber = dialIn && dialIn.numbers ? _getDefaultPhoneNumber(dialIn.numbers) : undefined; const phoneNumber = dialIn?.numbers ? _getDefaultPhoneNumber(dialIn.numbers) : undefined;
return { return {
_dialIn: dialIn, _dialIn: dialIn,
@ -233,9 +237,7 @@ function mapStateToProps(state, ownProps) {
_inviteContactsVisible: interfaceConfig.ENABLE_DIAL_OUT && !hideInviteContacts, _inviteContactsVisible: interfaceConfig.ENABLE_DIAL_OUT && !hideInviteContacts,
_inviteUrl: getInviteURL(state), _inviteUrl: getInviteURL(state),
_isVpaasMeeting: isVpaasMeeting(state), _isVpaasMeeting: isVpaasMeeting(state),
_liveStreamViewURL: _liveStreamViewURL: currentLiveStreamingSession?.liveStreamViewURL,
currentLiveStreamingSession
&& currentLiveStreamingSession.liveStreamViewURL,
_phoneNumber: phoneNumber _phoneNumber: phoneNumber
}; };
} }

View File

@ -1,11 +1,9 @@
// @flow
import React, { PureComponent } from 'react'; import React, { PureComponent } from 'react';
import { Dialog } from '../../../base/dialog'; import { translate } from '../../../base/i18n/functions';
import { translate } from '../../../base/i18n'; import Dialog from '../../../base/ui/components/web/Dialog';
import { openURLInBrowser } from '../../../base/util'; import { openURLInBrowser } from '../../../base/util/openURLInBrowser.web';
import { JAAS_UPGRADE_URL } from '../../constants'; import { JAAS_UPGRADE_URL } from '../../constants';
/** /**
@ -13,22 +11,19 @@ import { JAAS_UPGRADE_URL } from '../../constants';
* *
* @returns {React$Element<any>} * @returns {React$Element<any>}
*/ */
class PremiumFeatureDialog extends PureComponent<*> { class PremiumFeatureDialog extends PureComponent<any> {
/** /**
* Instantiates a new component. * Instantiates a new component.
* *
* @inheritdoc * @inheritdoc
*/ */
constructor(props) { constructor(props: any) {
super(props); super(props);
this._onSubmitValue = this._onSubmitValue.bind(this); this._onSubmitValue = this._onSubmitValue.bind(this);
} }
_onSubmitValue: () => void;
/** /**
* Callback to be invoked when the dialog ok is pressed. * Callback to be invoked when the dialog ok is pressed.
* *
@ -48,11 +43,10 @@ class PremiumFeatureDialog extends PureComponent<*> {
return ( return (
<Dialog <Dialog
hideCancelButton = { true } cancel = {{ hidden: true }}
okKey = { t('dialog.viewUpgradeOptions') } ok = {{ translationKey: 'dialog.viewUpgradeOptions' }}
onSubmit = { this._onSubmitValue } onSubmit = { this._onSubmitValue }
titleKey = { t('dialog.viewUpgradeOptionsTitle') } titleKey = { t('dialog.viewUpgradeOptionsTitle') }>
width = { 'small' }>
<span>{t('dialog.viewUpgradeOptionsContent')}</span> <span>{t('dialog.viewUpgradeOptionsContent')}</span>
</Dialog> </Dialog>
); );

View File

@ -3,9 +3,9 @@
import Spinner from '@atlaskit/spinner'; import Spinner from '@atlaskit/spinner';
import React from 'react'; import React from 'react';
import { Dialog } from '../../../../base/dialog';
import { translate } from '../../../../base/i18n'; import { translate } from '../../../../base/i18n';
import { connect } from '../../../../base/redux'; import { connect } from '../../../../base/redux';
import Dialog from '../../../../base/ui/components/web/Dialog';
import { import {
GOOGLE_API_STATES, GOOGLE_API_STATES,
GoogleSignInButton, GoogleSignInButton,
@ -85,12 +85,10 @@ class StartLiveStreamDialog
return ( return (
<Dialog <Dialog
cancelKey = 'dialog.Cancel' ok = {{ translationKey: 'dialog.startLiveStreaming' }}
okKey = 'dialog.startLiveStreaming'
onCancel = { this._onCancel } onCancel = { this._onCancel }
onSubmit = { this._onSubmit } onSubmit = { this._onSubmit }
titleKey = 'liveStreaming.start' titleKey = 'liveStreaming.start'>
width = { 'small' }>
<div className = 'live-stream-dialog'> <div className = 'live-stream-dialog'>
{ _googleApiApplicationClientID { _googleApiApplicationClientID
? this._renderYouTubePanel() : null } ? this._renderYouTubePanel() : null }

View File

@ -2,9 +2,9 @@
import React from 'react'; import React from 'react';
import { Dialog } from '../../../../base/dialog';
import { translate } from '../../../../base/i18n'; import { translate } from '../../../../base/i18n';
import { connect } from '../../../../base/redux'; import { connect } from '../../../../base/redux';
import Dialog from '../../../../base/ui/components/web/Dialog';
import AbstractStopLiveStreamDialog, { import AbstractStopLiveStreamDialog, {
_mapStateToProps _mapStateToProps
} from '../AbstractStopLiveStreamDialog'; } from '../AbstractStopLiveStreamDialog';
@ -26,10 +26,9 @@ class StopLiveStreamDialog extends AbstractStopLiveStreamDialog {
render() { render() {
return ( return (
<Dialog <Dialog
okKey = 'dialog.stopLiveStreaming' ok = {{ translationKey: 'dialog.stopLiveStreaming' }}
onSubmit = { this._onSubmit } onSubmit = { this._onSubmit }
titleKey = 'dialog.liveStreaming' titleKey = 'dialog.liveStreaming'>
width = 'small'>
{ this.props.t('dialog.stopStreamingWarning') } { this.props.t('dialog.stopStreamingWarning') }
</Dialog> </Dialog>
); );

View File

@ -1,8 +1,8 @@
import React from 'react'; import React from 'react';
import { Dialog } from '../../../../base/dialog';
import { translate } from '../../../../base/i18n'; import { translate } from '../../../../base/i18n';
import { connect } from '../../../../base/redux'; import { connect } from '../../../../base/redux';
import Dialog from '../../../../base/ui/components/web/Dialog';
import { toggleScreenshotCaptureSummary } from '../../../../screenshot-capture'; import { toggleScreenshotCaptureSummary } from '../../../../screenshot-capture';
import { isScreenshotCaptureEnabled } from '../../../../screenshot-capture/functions'; import { isScreenshotCaptureEnabled } from '../../../../screenshot-capture/functions';
import { RECORDING_TYPES } from '../../../constants'; import { RECORDING_TYPES } from '../../../constants';
@ -68,11 +68,12 @@ class StartRecordingDialog extends AbstractStartRecordingDialog {
return ( return (
<Dialog <Dialog
okDisabled = { this.isStartRecordingDisabled() } ok = {{
okKey = 'dialog.startRecording' translationKey: 'dialog.startRecording',
disabled: this.isStartRecordingDisabled()
}}
onSubmit = { this._onSubmit } onSubmit = { this._onSubmit }
titleKey = 'dialog.startRecording' titleKey = 'dialog.startRecording'>
width = 'small'>
<StartRecordingDialogContent <StartRecordingDialogContent
fileRecordingsServiceEnabled = { _fileRecordingsServiceEnabled } fileRecordingsServiceEnabled = { _fileRecordingsServiceEnabled }
fileRecordingsServiceSharingEnabled = { _fileRecordingsServiceSharingEnabled } fileRecordingsServiceSharingEnabled = { _fileRecordingsServiceSharingEnabled }

View File

@ -2,9 +2,9 @@
import React from 'react'; import React from 'react';
import { Dialog } from '../../../../base/dialog';
import { translate } from '../../../../base/i18n'; import { translate } from '../../../../base/i18n';
import { connect } from '../../../../base/redux'; import { connect } from '../../../../base/redux';
import Dialog from '../../../../base/ui/components/web/Dialog';
import { toggleScreenshotCaptureSummary } from '../../../../screenshot-capture'; import { toggleScreenshotCaptureSummary } from '../../../../screenshot-capture';
import AbstractStopRecordingDialog, { import AbstractStopRecordingDialog, {
type Props, type Props,
@ -29,10 +29,9 @@ class StopRecordingDialog extends AbstractStopRecordingDialog<Props> {
return ( return (
<Dialog <Dialog
okKey = 'dialog.confirm' ok = {{ translationKey: 'dialog.confirm' }}
onSubmit = { this._onSubmit } onSubmit = { this._onSubmit }
titleKey = 'dialog.recording' titleKey = 'dialog.recording'>
width = 'small'>
{t(localRecordingVideoStop ? 'recording.localRecordingVideoStop' : 'dialog.stopRecordingWarning') } {t(localRecordingVideoStop ? 'recording.localRecordingVideoStop' : 'dialog.stopRecordingWarning') }
</Dialog> </Dialog>
); );

View File

@ -1,20 +1,15 @@
/* eslint-disable lines-around-comment */
import React, { Component } from 'react'; import React, { Component } from 'react';
import { WithTranslation } from 'react-i18next'; import { WithTranslation } from 'react-i18next';
import type { Dispatch } from 'redux'; import type { Dispatch } from 'redux';
// @ts-ignore import { IState } from '../../app/types';
import { Dialog } from '../../base/dialog';
import { translate } from '../../base/i18n/functions'; import { translate } from '../../base/i18n/functions';
import { connect } from '../../base/redux/functions'; import { connect } from '../../base/redux/functions';
import { import { updateSettings } from '../../base/settings/actions';
shouldHideShareAudioHelper, import { shouldHideShareAudioHelper } from '../../base/settings/functions.any';
updateSettings import { toggleScreensharing } from '../../base/tracks/actions';
// @ts-ignore
} from '../../base/settings';
// @ts-ignore
import { toggleScreensharing } from '../../base/tracks';
import Checkbox from '../../base/ui/components/web/Checkbox'; import Checkbox from '../../base/ui/components/web/Checkbox';
import Dialog from '../../base/ui/components/web/Dialog';
/** /**
* The type of the React {@code Component} props of {@link ShareAudioDialog}. * The type of the React {@code Component} props of {@link ShareAudioDialog}.
@ -83,11 +78,11 @@ class ShareAudioDialog extends Component<Props> {
return ( return (
<Dialog <Dialog
hideCancelButton = { false } className = 'share-audio-dialog-container'
okKey = { t('dialog.shareAudio') } ok = {{ translationKey: 'dialog.shareAudio' }}
onSubmit = { this._onContinue } onSubmit = { this._onContinue }
titleKey = { t('dialog.shareAudioTitle') } size = 'large'
width = { 'medium' } > titleKey = { t('dialog.shareAudioTitle') }>
<div className = 'share-audio-dialog'> <div className = 'share-audio-dialog'>
<img <img
className = 'share-audio-animation' className = 'share-audio-animation'
@ -107,11 +102,11 @@ class ShareAudioDialog extends Component<Props> {
/** /**
* Maps part of the Redux state to the props of this component. * Maps part of the Redux state to the props of this component.
* *
* @param {Object} state - The Redux state. * @param {IState} state - The Redux state.
* @private * @private
* @returns {Props} * @returns {Props}
*/ */
function _mapStateToProps(state: Object): Partial<Props> { function _mapStateToProps(state: IState): Partial<Props> {
return { return {
_shouldHideShareAudioHelper: shouldHideShareAudioHelper(state) _shouldHideShareAudioHelper: shouldHideShareAudioHelper(state)