From f4cde2192e3b9b2dbf0be3c73eb36643abe5db6b Mon Sep 17 00:00:00 2001 From: hmuresan Date: Thu, 22 Jul 2021 15:26:56 +0300 Subject: [PATCH] fix(toolbar-buttons) Attempt fix Meet in integration --- react/features/toolbox/components/web/Toolbox.js | 14 +++++--------- react/features/toolbox/constants.js | 2 ++ 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/react/features/toolbox/components/web/Toolbox.js b/react/features/toolbox/components/web/Toolbox.js index a82fa7e84..8e25e9889 100644 --- a/react/features/toolbox/components/web/Toolbox.js +++ b/react/features/toolbox/components/web/Toolbox.js @@ -73,7 +73,7 @@ import { setToolbarHovered, showToolbox } from '../../actions'; -import { THRESHOLDS } from '../../constants'; +import { THRESHOLDS, NOT_APPLICABLE } from '../../constants'; import { isToolboxVisible } from '../../functions'; import DownloadButton from '../DownloadButton'; import HangupButton from '../HangupButton'; @@ -597,6 +597,7 @@ class Toolbox extends Component { const participants = { key: 'participants-pane', + alias: 'invite', Content: ParticipantsPaneButton, handleClick: this._onToolbarToggleParticipantsPane, group: 2 @@ -624,12 +625,7 @@ class Toolbox extends Component { const security = { key: 'security', - Content: SecurityDialogButton, - group: 2 - }; - - const info = { - key: 'info', + alias: 'info', Content: SecurityDialogButton, group: 2 }; @@ -748,7 +744,6 @@ class Toolbox extends Component { videoQuality, fullscreen, security, - info, cc, recording, localRecording, @@ -793,7 +788,8 @@ class Toolbox extends Component { const filtered = [ ...order.map(key => buttons[key]), ...Object.values(buttons).filter((button, index) => !order.includes(keys[index])) - ].filter(Boolean).filter(({ key }) => isToolbarButtonEnabled(key, _toolbarButtons)); + ].filter(Boolean).filter(({ key, alias = NOT_APPLICABLE }) => + isToolbarButtonEnabled(key, _toolbarButtons) || isToolbarButtonEnabled(alias, _toolbarButtons)); if (isHangupVisible) { sliceIndex -= 1; diff --git a/react/features/toolbox/constants.js b/react/features/toolbox/constants.js index ba6ea423b..7ef06c6b3 100644 --- a/react/features/toolbox/constants.js +++ b/react/features/toolbox/constants.js @@ -27,3 +27,5 @@ export const THRESHOLDS = [ order: [ 'microphone', 'camera' ] } ]; + +export const NOT_APPLICABLE = 'N/A';