mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
Currently if a button in the main toolbar is not visible, the button is not replaced by another button from the overflow menu.
29 lines
917 B
TypeScript
29 lines
917 B
TypeScript
/**
|
|
* Returns true if the security dialog button should be visible and false otherwise.
|
|
*
|
|
* @param {Object} options - The parameters needed to determine the security dialog button visibility.
|
|
* @returns {boolean}
|
|
*/
|
|
export function isSecurityDialogButtonVisible({
|
|
conference,
|
|
securityUIConfig,
|
|
isModerator,
|
|
enabledLobbyModeFlag,
|
|
enabledSecurityOptionsFlag,
|
|
enabledMeetingPassFlag
|
|
}: {
|
|
conference: any;
|
|
enabledLobbyModeFlag: boolean;
|
|
enabledMeetingPassFlag: boolean;
|
|
enabledSecurityOptionsFlag: boolean;
|
|
isModerator: boolean;
|
|
securityUIConfig: { hideLobbyButton?: boolean; };
|
|
}) {
|
|
const { hideLobbyButton } = securityUIConfig;
|
|
const lobbySupported = conference?.isLobbySupported();
|
|
const lobby = lobbySupported && isModerator && !hideLobbyButton;
|
|
|
|
|
|
return enabledSecurityOptionsFlag && ((enabledLobbyModeFlag && lobby) || enabledMeetingPassFlag);
|
|
}
|