added signInRequired in joinDialog
parent
a8c6169945
commit
59617aa2ad
|
|
@ -1314,7 +1314,14 @@ export default class RoomClient
|
|||
await this.sendRequest('changeDisplayName', { displayName });
|
||||
break;
|
||||
}
|
||||
|
||||
case 'signInRequired':
|
||||
{
|
||||
store.dispatch(stateActions.setSignInRequired(true));
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case 'roomReady':
|
||||
{
|
||||
store.dispatch(stateActions.toggleJoined());
|
||||
|
|
|
|||
|
|
@ -53,6 +53,14 @@ export const setInLobby = (inLobby) =>
|
|||
};
|
||||
};
|
||||
|
||||
export const setSignInRequired = (signInRequired) =>
|
||||
{
|
||||
return {
|
||||
type : 'SET_SIGN_IN_REQUIRED',
|
||||
payload : { signInRequired }
|
||||
};
|
||||
};
|
||||
|
||||
export const setAccessCode = (accessCode) =>
|
||||
{
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -198,7 +198,16 @@ const JoinDialog = ({
|
|||
:
|
||||
<Typography variant='h6'>
|
||||
<div className={classes.green}> Ok, you are ready</div>
|
||||
The room is looked - hang on until somebody lets you in ...
|
||||
{ room.signInRequired ?
|
||||
<div>
|
||||
The room is empty!
|
||||
You can Log In to start the meeting or wait until the host joins.
|
||||
</div>
|
||||
:
|
||||
<div>
|
||||
The room is locked - hang on until somebody lets you in ...
|
||||
</div>
|
||||
}
|
||||
</Typography>
|
||||
}
|
||||
|
||||
|
|
@ -252,6 +261,7 @@ export default withRoomContext(connect(
|
|||
{
|
||||
return (
|
||||
prev.room.inLobby === next.room.inLobby &&
|
||||
prev.room.signInRequired === next.room.signInRequired &&
|
||||
prev.settings.displayName === next.settings.displayName &&
|
||||
prev.me.loginEnabled === next.me.loginEnabled &&
|
||||
prev.me.loggedIn === next.me.loggedIn &&
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ const initialState =
|
|||
state : 'new', // new/connecting/connected/disconnected/closed,
|
||||
locked : false,
|
||||
inLobby : false,
|
||||
signInRequired : false,
|
||||
accessCode : '', // access code to the room if locked and joinByAccessCode == true
|
||||
joinByAccessCode : true, // if true: accessCode is a possibility to open the room
|
||||
activeSpeakerId : null,
|
||||
|
|
@ -66,6 +67,13 @@ const room = (state = initialState, action) =>
|
|||
return { ...state, inLobby };
|
||||
}
|
||||
|
||||
case 'SET_SIGN_IN_REQUIRED':
|
||||
{
|
||||
const { signInRequired } = action.payload;
|
||||
|
||||
return { ...state, signInRequired };
|
||||
}
|
||||
|
||||
case 'SET_ACCESS_CODE':
|
||||
{
|
||||
const { accessCode } = action.payload;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
const EventEmitter = require('events').EventEmitter;
|
||||
const Logger = require('./Logger');
|
||||
const config = require('../config/config');
|
||||
|
||||
|
||||
const logger = new Logger('Lobby');
|
||||
|
||||
|
|
@ -89,6 +91,9 @@ class Lobby extends EventEmitter
|
|||
|
||||
this._notification(peer.socket, 'enteredLobby');
|
||||
|
||||
if (config.requireSignInToAccess && !peer.authenticated && !super.isLocked)
|
||||
this._notification(peer.socket, 'signInRequired');
|
||||
|
||||
this._peers.set(peer.id, peer);
|
||||
|
||||
peer.on('authenticationChanged', () =>
|
||||
|
|
|
|||
|
|
@ -83,6 +83,11 @@ class Room extends EventEmitter
|
|||
this._handleAudioLevelObserver();
|
||||
}
|
||||
|
||||
isLocked()
|
||||
{
|
||||
return this._locked;
|
||||
}
|
||||
|
||||
close()
|
||||
{
|
||||
logger.debug('close()');
|
||||
|
|
|
|||
Loading…
Reference in New Issue