fix hide toolbar only appearing for presenter

This commit is contained in:
Ramón Souza 2024-02-08 09:29:10 -03:00
parent c6f82eed1e
commit 0487eec4ca

View File

@ -358,20 +358,17 @@ const PresentationMenu = (props) => {
); );
} }
const tools = document.querySelector('.tlui-toolbar, .tlui-style-panel__wrapper, .tlui-menu-zone'); menuItems.push(
if (tools && (props.hasWBAccess || props.amIPresenter)){ {
menuItems.push( key: 'list-item-toolvisibility',
{ dataTest: 'toolVisibility',
key: 'list-item-toolvisibility', label: formattedVisibilityLabel(isToolbarVisible),
dataTest: 'toolVisibility', icon: isToolbarVisible ? 'close' : 'pen_tool',
label: formattedVisibilityLabel(isToolbarVisible), onClick: () => {
icon: isToolbarVisible ? 'close' : 'pen_tool', setIsToolbarVisible(!isToolbarVisible);
onClick: () => {
setIsToolbarVisible(!isToolbarVisible);
},
}, },
); },
} );
if (props.amIPresenter) { if (props.amIPresenter) {
menuItems.push({ menuItems.push({