Merge pull request #6617 from jfsiebel/lock-settings-microphone-flow

Show audio modal when microphone is locked
This commit is contained in:
Anton Georgiev 2019-01-28 15:33:21 -05:00 committed by GitHub
commit 82132d38cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 9 additions and 38 deletions

View File

@ -17,7 +17,7 @@ export default function addUserSettings(credentials, meetingId, userId, settings
'forceListenOnly',
'skipCheck',
'clientTitle',
'lockOnJoin', // NOT IMPLEMENTED YET
'lockOnJoin',
'askForFeedbackOnLogout',
// BRANDING
'displayBrandingArea',

View File

@ -194,7 +194,7 @@ class App extends Component {
render() {
const {
customStyle, customStyleUrl, micsLocked, openPanel,
customStyle, customStyleUrl, openPanel,
} = this.props;
return (
@ -211,7 +211,7 @@ class App extends Component {
</section>
<PollingContainer />
<ModalContainer />
{micsLocked ? null : <AudioContainer />}
<AudioContainer />
<ToastContainer />
<ChatAlertContainer />
{customStyleUrl ? <link rel="stylesheet" type="text/css" href={customStyleUrl} /> : null}

View File

@ -116,7 +116,6 @@ export default injectIntl(withModalMounter(withTracker(({ intl, baseControls })
chatIsOpen: Session.equals('openPanel', 'chat'),
openPanel: Session.get('openPanel'),
userListIsOpen: !Session.equals('openPanel', ''),
micsLocked: (currentUserIsLocked && meeting.lockSettingsProp.disableMic),
};
})(AppContainer)));

View File

@ -44,12 +44,7 @@ export default withModalMounter(withTracker(({ mountModal }) => ({
glow: Service.isTalking() && !Service.isMuted(),
handleToggleMuteMicrophone: () => Service.toggleMuteMicrophone(),
handleJoinAudio: () => {
const meeting = Meetings.findOne({ meetingId: Auth.meetingID });
const currentUser = Users.findOne({ userId: Auth.userID });
const currentUserIsLocked = mapUser(currentUser).isLocked;
const micsLocked = (currentUserIsLocked && meeting.lockSettingsProp.disableMic);
return micsLocked ? Service.joinListenOnly() : mountModal(<AudioModalContainer />);
return Service.isConnected() ? Service.joinListenOnly() : mountModal(<AudioModalContainer />);
},
handleLeaveAudio: () => Service.exitAudio(),
}))(AudioControlsContainer));

View File

@ -129,6 +129,7 @@ class AudioModal extends Component {
joinFullAudioImmediately,
joinFullAudioEchoTest,
forceListenOnlyAttendee,
audioLocked,
} = this.props;
if (joinFullAudioImmediately) {
@ -139,7 +140,7 @@ class AudioModal extends Component {
this.handleGoToEchoTest();
}
if (forceListenOnlyAttendee) {
if (forceListenOnlyAttendee || audioLocked) {
this.handleJoinListenOnly();
}
}
@ -266,9 +267,11 @@ class AudioModal extends Component {
audioLocked,
} = this.props;
const showMicrophone = forceListenOnlyAttendee || audioLocked;
return (
<span className={styles.audioOptions}>
{!forceListenOnlyAttendee
{!showMicrophone
? (
<Button
className={styles.audioBtn}

View File

@ -50,10 +50,6 @@ const intlMessages = defineMessages({
id: 'app.lock-viewers.PrivateChatLable',
description: 'description for close button',
},
layoutLable: {
id: 'app.lock-viewers.Layout',
description: 'description for close button',
},
});
class LockViewersComponent extends React.PureComponent {
@ -197,28 +193,6 @@ class LockViewersComponent extends React.PureComponent {
</div>
</div>
</div>
<div className={styles.row}>
<div className={styles.col} aria-hidden="true">
<div className={styles.formElement}>
<div className={styles.label}>
{intl.formatMessage(intlMessages.layoutLable)}
</div>
</div>
</div>
<div className={styles.col}>
<div className={cx(styles.formElement, styles.pullContentRight)}>
<Toggle
icons={false}
defaultChecked={meeting.lockSettingsProp.lockedLayout}
onChange={() => {
meeting.lockSettingsProp.lockedLayout = !meeting.lockSettingsProp.lockedLayout;
toggleLockSettings(meeting);
}}
ariaLabel={intl.formatMessage(intlMessages.layoutLable)}
/>
</div>
</div>
</div>
</div>
</div>
</Modal>