Merge pull request #20670 from ramonlsouza/issue-20667
fix: Manage Layouts ignores disabledFeatures
This commit is contained in:
commit
2ef8b4649f
@ -15,6 +15,7 @@ import { colorDanger, colorWhite } from '/imports/ui/stylesheets/styled-componen
|
|||||||
import Styled from './styles';
|
import Styled from './styles';
|
||||||
import browserInfo from '/imports/utils/browserInfo';
|
import browserInfo from '/imports/utils/browserInfo';
|
||||||
import deviceInfo from '/imports/utils/deviceInfo';
|
import deviceInfo from '/imports/utils/deviceInfo';
|
||||||
|
import { isLayoutsEnabled } from '/imports/ui/services/features';
|
||||||
|
|
||||||
const intlMessages = defineMessages({
|
const intlMessages = defineMessages({
|
||||||
optionsLabel: {
|
optionsLabel: {
|
||||||
@ -322,6 +323,8 @@ class SettingsDropdown extends PureComponent {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const enableLayoutButton = isLayoutsEnabled();
|
||||||
|
|
||||||
this.menuItems.push(
|
this.menuItems.push(
|
||||||
{
|
{
|
||||||
key: 'list-item-shortcuts',
|
key: 'list-item-shortcuts',
|
||||||
@ -329,18 +332,21 @@ class SettingsDropdown extends PureComponent {
|
|||||||
label: intl.formatMessage(intlMessages.hotkeysLabel),
|
label: intl.formatMessage(intlMessages.hotkeysLabel),
|
||||||
description: intl.formatMessage(intlMessages.hotkeysDesc),
|
description: intl.formatMessage(intlMessages.hotkeysDesc),
|
||||||
onClick: () => this.setShortcutHelpModalIsOpen(true),
|
onClick: () => this.setShortcutHelpModalIsOpen(true),
|
||||||
|
divider: !isDirectLeaveButtonEnabled && !enableLayoutButton,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
this.menuItems.push(
|
if (enableLayoutButton) {
|
||||||
{
|
this.menuItems.push(
|
||||||
key: 'list-item-layout-modal',
|
{
|
||||||
icon: 'manage_layout',
|
key: 'list-item-layout-modal',
|
||||||
label: intl.formatMessage(intlMessages.layoutModal),
|
icon: 'manage_layout',
|
||||||
onClick: () => this.setLayoutModalIsOpen(true),
|
label: intl.formatMessage(intlMessages.layoutModal),
|
||||||
divider: isDirectLeaveButtonEnabled ? false : true,
|
onClick: () => this.setLayoutModalIsOpen(true),
|
||||||
},
|
divider: !isDirectLeaveButtonEnabled,
|
||||||
);
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (allowLogoutSetting && isMeteorConnected && !isDirectLeaveButtonEnabled) {
|
if (allowLogoutSetting && isMeteorConnected && !isDirectLeaveButtonEnabled) {
|
||||||
this.menuItems.push(
|
this.menuItems.push(
|
||||||
|
Loading…
Reference in New Issue
Block a user