Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
feat(authentication): Hides password button from lobby on waiting for host.
damenchodc07c6fedec2
diff --git a/lang/main.json b/lang/main.jsonindex 1e97bf5520..e1a3c87037 100644--- a/lang/main.json+++ b/lang/main.json@@ -663,7 +663,6 @@"notificationLobbyDisabled": "Lobby has been disabled by {{originParticipantName}}","notificationLobbyEnabled": "Lobby has been enabled by {{originParticipantName}}","notificationTitle": "Lobby",- "passwordField": "Enter meeting password","passwordJoinButton": "Join","reject": "Reject","rejectAll": "Reject all",diff --git a/react/features/base/conference/reducer.ts b/react/features/base/conference/reducer.tsindex 33b816ffbb..f2ad3fff42 100644--- a/react/features/base/conference/reducer.ts+++ b/react/features/base/conference/reducer.ts@@ -137,6 +137,7 @@ export interface IConferenceState {followMeEnabled?: boolean;joining?: IJitsiConference;leaving?: IJitsiConference;+ lobbyWaitingForHost?: boolean;localSubject?: string;locked?: string;membersOnly?: IJitsiConference;@@ -162,6 +163,10 @@ export interface IJitsiConferenceRoom {roomjid: string;}+interface IConferenceFailedError extends Error {+ params: Array<any>;+}+/*** Listen for actions that contain the conference object, so that it can be* stored for use by other action creators.@@ -274,7 +279,7 @@ function _authStatusChanged(state: IConferenceState,* reduction of the specified action.*/function _conferenceFailed(state: IConferenceState, { conference, error }: {- conference: IJitsiConference; error: Error; }) {+ conference: IJitsiConference; error: IConferenceFailedError; }) {// The current (similar to getCurrentConference in// base/conference/functions.any.js) conference which is joining or joined:const conference_ = state.conference || state.joining;@@ -286,6 +291,7 @@ function _conferenceFailed(state: IConferenceState, { conference, error }: {let authRequired;let membersOnly;let passwordRequired;+ let lobbyWaitingForHost;switch (error.name) {case JitsiConferenceErrors.AUTHENTICATION_REQUIRED:@@ -293,9 +299,16 @@ function _conferenceFailed(state: IConferenceState, { conference, error }: {break;case JitsiConferenceErrors.CONFERENCE_ACCESS_DENIED:- case JitsiConferenceErrors.MEMBERS_ONLY_ERROR:+ case JitsiConferenceErrors.MEMBERS_ONLY_ERROR: {membersOnly = conference;++ // eslint-disable-next-line @typescript-eslint/no-unused-vars+ const [ _lobbyJid, _lobbyWaitingForHost ] = error.params;++ lobbyWaitingForHost = _lobbyWaitingForHost;+break;+ }case JitsiConferenceErrors.PASSWORD_REQUIRED:passwordRequired = conference;@@ -309,6 +322,7 @@ function _conferenceFailed(state: IConferenceState, { conference, error }: {error,joining: undefined,leaving: undefined,+ lobbyWaitingForHost,/*** The indicator of how the conference/room is locked. If falsy, the@@ -365,6 +379,8 @@ function _conferenceJoined(state: IConferenceState, { conference }: { conferencemembersOnly: undefined,leaving: undefined,+ lobbyWaitingForHost: undefined,+/*** The indicator which determines whether the conference is locked.*diff --git a/react/features/lobby/components/AbstractLobbyScreen.tsx b/react/features/lobby/components/AbstractLobbyScreen.tsxindex 22a7467c75..380b8735d1 100644--- a/react/features/lobby/components/AbstractLobbyScreen.tsx+++ b/react/features/lobby/components/AbstractLobbyScreen.tsx@@ -445,7 +445,7 @@ export function _mapStateToProps(state: IReduxState) {const { disableLobbyPassword } = getSecurityUiConfig(state);const showCopyUrlButton = inviteEnabledFlag || !disableInviteFunctions;const deviceStatusVisible = isDeviceStatusVisible(state);- const { membersOnly } = state['features/base/conference'];+ const { membersOnly, lobbyWaitingForHost } = state['features/base/conference'];const { isLobbyChatActive, lobbyMessageRecipient, messages } = state['features/chat'];return {@@ -461,7 +461,7 @@ export function _mapStateToProps(state: IReduxState) {_participantId: participantId,_participantName: localParticipant?.name,_passwordJoinFailed: passwordJoinFailed,- _renderPassword: !iAmSipGateway && !disableLobbyPassword,+ _renderPassword: !iAmSipGateway && !disableLobbyPassword && !lobbyWaitingForHost,showCopyUrlButton};}diff --git a/react/features/lobby/components/native/LobbyScreen.tsx b/react/features/lobby/components/native/LobbyScreen.tsxindex 41974ed518..c7e7cda1c3 100644--- a/react/features/lobby/components/native/LobbyScreen.tsx+++ b/react/features/lobby/components/native/LobbyScreen.tsx@@ -160,7 +160,7 @@ class LobbyScreen extends AbstractLobbyScreen<IProps> {customStyles = {{ input: styles.customInput }}error = { _passwordJoinFailed }onChange = { this._onChangePassword }- placeholder = { t('lobby.passwordField') }+ placeholder = { t('lobby.enterPasswordButton') }secureTextEntry = { true }value = { this.state.password } />);diff --git a/react/features/lobby/components/web/LobbyScreen.tsx b/react/features/lobby/components/web/LobbyScreen.tsxindex fd5a4b985d..507d74d82f 100644--- a/react/features/lobby/components/web/LobbyScreen.tsx+++ b/react/features/lobby/components/web/LobbyScreen.tsx@@ -189,7 +189,7 @@ class LobbyScreen extends AbstractLobbyScreen<IProps> {className = { `lobby-prejoin-input ${_passwordJoinFailed ? 'error' : ''}` }id = 'lobby-password-input'onChange = { this._onChangePassword }- placeholder = { t('lobby.passwordField') }+ placeholder = { t('lobby.enterPasswordButton') }testId = 'lobby.password'type = 'password'value = { this.state.password } />