From 59e2609ffa33354d93bc5957c239e2a90300a739 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ram=C3=B3n=20Souza?= Date: Tue, 9 Jul 2024 09:10:06 -0300 Subject: [PATCH] do not display layout button if layouts are disabled --- .../nav-bar/settings-dropdown/component.jsx | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/bigbluebutton-html5/imports/ui/components/nav-bar/settings-dropdown/component.jsx b/bigbluebutton-html5/imports/ui/components/nav-bar/settings-dropdown/component.jsx index a204acd877..b6bdd47cd0 100644 --- a/bigbluebutton-html5/imports/ui/components/nav-bar/settings-dropdown/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/nav-bar/settings-dropdown/component.jsx @@ -15,6 +15,7 @@ import { colorDanger, colorWhite } from '/imports/ui/stylesheets/styled-componen import Styled from './styles'; import browserInfo from '/imports/utils/browserInfo'; import deviceInfo from '/imports/utils/deviceInfo'; +import { isLayoutsEnabled } from '/imports/ui/services/features'; const intlMessages = defineMessages({ optionsLabel: { @@ -322,6 +323,8 @@ class SettingsDropdown extends PureComponent { ); } + const enableLayoutButton = isLayoutsEnabled(); + this.menuItems.push( { key: 'list-item-shortcuts', @@ -329,18 +332,21 @@ class SettingsDropdown extends PureComponent { label: intl.formatMessage(intlMessages.hotkeysLabel), description: intl.formatMessage(intlMessages.hotkeysDesc), onClick: () => this.setShortcutHelpModalIsOpen(true), + divider: !isDirectLeaveButtonEnabled && !enableLayoutButton, }, ); - this.menuItems.push( - { - key: 'list-item-layout-modal', - icon: 'manage_layout', - label: intl.formatMessage(intlMessages.layoutModal), - onClick: () => this.setLayoutModalIsOpen(true), - divider: isDirectLeaveButtonEnabled ? false : true, - }, - ); + if (enableLayoutButton) { + this.menuItems.push( + { + key: 'list-item-layout-modal', + icon: 'manage_layout', + label: intl.formatMessage(intlMessages.layoutModal), + onClick: () => this.setLayoutModalIsOpen(true), + divider: !isDirectLeaveButtonEnabled, + }, + ); + } if (allowLogoutSetting && isMeteorConnected && !isDirectLeaveButtonEnabled) { this.menuItems.push(