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