diff --git a/bigbluebutton-html5/imports/ui/components/app/component.jsx b/bigbluebutton-html5/imports/ui/components/app/component.jsx index 355ae20df1..dfe53b0946 100755 --- a/bigbluebutton-html5/imports/ui/components/app/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/app/component.jsx @@ -263,10 +263,14 @@ class App extends Component { }); if (pushLayoutToEveryone) { - LayoutService.setMeetingLayout(settingsLayout); + LayoutService.setMeetingLayout(selectedLayout); } } + if (pushLayoutToEveryone && !prevProps.pushLayoutToEveryone) { + LayoutService.setMeetingLayout(selectedLayout); + } + if (mountRandomUserModal) mountModal(); if (prevProps.currentUserEmoji.status !== currentUserEmoji.status) { diff --git a/bigbluebutton-html5/imports/ui/components/app/container.jsx b/bigbluebutton-html5/imports/ui/components/app/container.jsx index e99676df35..6a30770e09 100755 --- a/bigbluebutton-html5/imports/ui/components/app/container.jsx +++ b/bigbluebutton-html5/imports/ui/components/app/container.jsx @@ -184,7 +184,7 @@ export default injectIntl(withModalMounter(withTracker(({ intl, baseControls }) }).fetch(); const AppSettings = Settings.application; - const { selectedLayout } = AppSettings; + const { selectedLayout, pushLayout } = AppSettings; const { viewScreenshare } = Settings.dataSaving; const shouldShowExternalVideo = MediaService.shouldShowExternalVideo(); const shouldShowScreenshare = MediaService.shouldShowScreenshare() @@ -217,8 +217,7 @@ export default injectIntl(withModalMounter(withTracker(({ intl, baseControls }) isPresenter: currentUser?.presenter, meetingLayout: layout, selectedLayout, - settingsLayout: selectedLayout?.replace('Push', ''), - pushLayoutToEveryone: selectedLayout?.includes('Push'), + pushLayoutToEveryone: pushLayout, audioAlertEnabled: AppSettings.chatAudioAlerts, pushAlertEnabled: AppSettings.chatPushAlerts, shouldShowScreenshare, diff --git a/bigbluebutton-html5/imports/ui/components/settings/submenus/application/component.jsx b/bigbluebutton-html5/imports/ui/components/settings/submenus/application/component.jsx index ff568c315e..a6569b0d7f 100644 --- a/bigbluebutton-html5/imports/ui/components/settings/submenus/application/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/settings/submenus/application/component.jsx @@ -73,6 +73,10 @@ const intlMessages = defineMessages({ id: 'app.submenu.application.layoutOptionLabel', description: 'layout options', }, + pushLayoutLabel: { + id: 'app.submenu.application.pushLayoutLabel', + description: 'push layout togle', + }, customLayout: { id: 'app.layout.style.custom', description: 'label for custom layout style', @@ -321,19 +325,9 @@ class ApplicationMenu extends BaseMenu { } renderChangeLayout() { - const { intl, isModerator } = this.props; + const { intl, isModerator, showToggleLabel, displaySettingsStatus } = this.props; const { settings } = this.state; - if (isModerator) { - const pushLayouts = { - CUSTOM_PUSH: 'customPush', - SMART_PUSH: 'smartPush', - PRESENTATION_FOCUS_PUSH: 'presentationFocusPush', - VIDEO_FOCUS_PUSH: 'videoFocusPush', - }; - Object.assign(LAYOUT_TYPE, pushLayouts); - } - return ( <> @@ -359,6 +353,29 @@ class ApplicationMenu extends BaseMenu { + { isModerator ? + ( + + + + {intl.formatMessage(intlMessages.pushLayoutLabel)} + + + + + + {displaySettingsStatus(settings.pushLayout)} + this.handleToggle('pushLayout')} + ariaLabel={intl.formatMessage(intlMessages.pushLayoutLabel)} + showToggleLabel={showToggleLabel} + /> + + + + ) : null } ); } diff --git a/bigbluebutton-html5/public/locales/en.json b/bigbluebutton-html5/public/locales/en.json index 517b5e5538..ff07884f07 100755 --- a/bigbluebutton-html5/public/locales/en.json +++ b/bigbluebutton-html5/public/locales/en.json @@ -381,6 +381,7 @@ "app.submenu.application.noLocaleOptionLabel": "No active locales", "app.submenu.application.paginationEnabledLabel": "Video pagination", "app.submenu.application.layoutOptionLabel": "Layout type", + "app.submenu.application.pushLayoutLabel": "Push layout", "app.submenu.notification.SectionTitle": "Notifications", "app.submenu.notification.Desc": "Define how and what you will be notified.", "app.submenu.notification.audioAlertLabel": "Audio Alerts", diff --git a/bigbluebutton-html5/public/locales/pt_BR.json b/bigbluebutton-html5/public/locales/pt_BR.json index 52aa7b33eb..16f62fd477 100644 --- a/bigbluebutton-html5/public/locales/pt_BR.json +++ b/bigbluebutton-html5/public/locales/pt_BR.json @@ -376,6 +376,7 @@ "app.submenu.application.noLocaleOptionLabel": "Não existem esquemas de idiomas disponíveis", "app.submenu.application.paginationEnabledLabel": "Paginação de vídeo", "app.submenu.application.layoutOptionLabel": "Tipo de layout", + "app.submenu.application.pushLayoutLabel": "Replicar layout", "app.submenu.notification.SectionTitle": "Notificações", "app.submenu.notification.Desc": "Defina suas notificações.", "app.submenu.notification.audioAlertLabel": "Alertas de áudio",