Merge pull request #7382 from KDSBrowne/_summit-move-modal-warnings-to-top

Move warnings to top of modals
This commit is contained in:
Anton Georgiev 2019-05-13 16:24:18 -04:00 committed by GitHub
commit 9880ca85b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 27 deletions

View File

@ -281,7 +281,6 @@ class AudioModal extends Component {
skipCheck, skipCheck,
audioLocked, audioLocked,
isMobileNative, isMobileNative,
isIEOrEdge,
formattedDialNum, formattedDialNum,
} = this.props; } = this.props;
@ -316,18 +315,6 @@ class AudioModal extends Component {
) )
: null} : null}
</span> </span>
{isIEOrEdge ? (
<p className={cx(styles.text, styles.browserWarning)}>
<FormattedMessage
id="app.audioModal.unsupportedBrowserLabel"
description="Warning when someone joins with a browser that isnt supported"
values={{
0: <a href="https://www.google.com/chrome/">Chrome</a>,
1: <a href="https://getfirefox.com">Firefox</a>,
}}
/>
</p>
) : null}
{formattedDialNum ? ( {formattedDialNum ? (
<Button <Button
className={styles.audioDial} className={styles.audioDial}
@ -444,6 +431,7 @@ class AudioModal extends Component {
showPermissionsOvelay, showPermissionsOvelay,
isIOSChrome, isIOSChrome,
closeModal, closeModal,
isIEOrEdge,
} = this.props; } = this.props;
const { content } = this.state; const { content } = this.state;
@ -458,6 +446,18 @@ class AudioModal extends Component {
hideBorder hideBorder
contentLabel={intl.formatMessage(intlMessages.ariaModalTitle)} contentLabel={intl.formatMessage(intlMessages.ariaModalTitle)}
> >
{isIEOrEdge ? (
<p className={cx(styles.text, styles.browserWarning)}>
<FormattedMessage
id="app.audioModal.unsupportedBrowserLabel"
description="Warning when someone joins with a browser that isnt supported"
values={{
0: <a href="https://www.google.com/chrome/">Chrome</a>,
1: <a href="https://getfirefox.com">Firefox</a>,
}}
/>
</p>
) : null}
{!this.skipAudioOptions() {!this.skipAudioOptions()
? ( ? (

View File

@ -417,6 +417,18 @@ class VideoPreview extends Component {
onRequestClose={this.handleProceed} onRequestClose={this.handleProceed}
hideBorder hideBorder
> >
{browser().name === 'edge' || browser().name === 'ie' ? (
<p className={styles.browserWarning}>
<FormattedMessage
id="app.audioModal.unsupportedBrowserLabel"
description="Warning when someone joins with a browser that isnt supported"
values={{
0: <a href="https://www.google.com/chrome/">Chrome</a>,
1: <a href="https://getfirefox.com">Firefox</a>,
}}
/>
</p>
) : null }
<div className={styles.title}> <div className={styles.title}>
{intl.formatMessage(intlMessages.webcamSettingsTitle)} {intl.formatMessage(intlMessages.webcamSettingsTitle)}
</div> </div>
@ -431,11 +443,12 @@ class VideoPreview extends Component {
/> />
</div> </div>
<div className={styles.col}> <div className={styles.col}>
<label className={styles.label}> <label className={styles.label} htmlFor="setCam">
{intl.formatMessage(intlMessages.cameraLabel)} {intl.formatMessage(intlMessages.cameraLabel)}
</label> </label>
{availableWebcams && availableWebcams.length > 0 ? ( {availableWebcams && availableWebcams.length > 0 ? (
<select <select
id="setCam"
value={webcamDeviceId} value={webcamDeviceId}
className={styles.select} className={styles.select}
onChange={this.handleSelectWebcam.bind(this)} onChange={this.handleSelectWebcam.bind(this)}
@ -452,11 +465,12 @@ class VideoPreview extends Component {
{intl.formatMessage(intlMessages.webcamNotFoundLabel)} {intl.formatMessage(intlMessages.webcamNotFoundLabel)}
</span> </span>
)} )}
<label className={styles.label}> <label className={styles.label} htmlFor="setQuality">
{intl.formatMessage(intlMessages.qualityLabel)} {intl.formatMessage(intlMessages.qualityLabel)}
</label> </label>
{availableProfiles && availableProfiles.length > 0 ? ( {availableProfiles && availableProfiles.length > 0 ? (
<select <select
id="setQuality"
value={selectedProfile} value={selectedProfile}
className={styles.select} className={styles.select}
onChange={this.handleSelectProfile.bind(this)} onChange={this.handleSelectProfile.bind(this)}
@ -475,18 +489,7 @@ class VideoPreview extends Component {
)} )}
</div> </div>
</div> </div>
{browser().name === 'edge' || browser().name === 'ie' ? (
<p className={styles.browserWarning}>
<FormattedMessage
id="app.audioModal.unsupportedBrowserLabel"
description="Warning when someone joins with a browser that isnt supported"
values={{
0: <a href="https://www.google.com/chrome/">Chrome</a>,
1: <a href="https://getfirefox.com">Firefox</a>,
}}
/>
</p>
) : null }
<div className={styles.footer}> <div className={styles.footer}>
<div className={styles.actions}> <div className={styles.actions}>
<Button <Button