From 006c6e8c430e9c806101a772c5d26a061f382b59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Victor?= Date: Mon, 18 Mar 2024 17:42:03 -0300 Subject: [PATCH 1/2] fix(layout): defaultLayout join parameter --- .../users-settings/server/methods/addUserSettings.js | 1 + .../layout/push-layout/pushLayoutEngine.jsx | 11 ++++++++--- docs/docs/administration/customize.md | 1 + docs/docs/data/join.tsx | 6 ------ docs/docs/development/api.md | 2 ++ 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/bigbluebutton-html5/imports/api/users-settings/server/methods/addUserSettings.js b/bigbluebutton-html5/imports/api/users-settings/server/methods/addUserSettings.js index e1caa8c1d9..260a57c062 100644 --- a/bigbluebutton-html5/imports/api/users-settings/server/methods/addUserSettings.js +++ b/bigbluebutton-html5/imports/api/users-settings/server/methods/addUserSettings.js @@ -66,6 +66,7 @@ const currentParameters = [ 'bbb_hide_nav_bar', 'bbb_change_layout', 'bbb_direct_leave_button', + 'bbb_default_layout', ]; function valueParser(val) { diff --git a/bigbluebutton-html5/imports/ui/components/layout/push-layout/pushLayoutEngine.jsx b/bigbluebutton-html5/imports/ui/components/layout/push-layout/pushLayoutEngine.jsx index 46215118e5..fa16b11a2c 100644 --- a/bigbluebutton-html5/imports/ui/components/layout/push-layout/pushLayoutEngine.jsx +++ b/bigbluebutton-html5/imports/ui/components/layout/push-layout/pushLayoutEngine.jsx @@ -70,10 +70,15 @@ class PushLayoutEngine extends React.Component { pushLayoutMeeting, } = this.props; - const userLayout = LAYOUT_TYPE[getFromUserSettings('bbb_change_layout', false)]; - Settings.application.selectedLayout = enforceLayout || userLayout || meetingLayout; + const changeLayout = LAYOUT_TYPE[getFromUserSettings('bbb_change_layout', null)]; + const defaultLayout = LAYOUT_TYPE[getFromUserSettings('bbb_default_layout', null)]; - let selectedLayout = Settings.application.selectedLayout; + Settings.application.selectedLayout = enforceLayout + || changeLayout + || defaultLayout + || meetingLayout; + + let { selectedLayout } = Settings.application; if (isMobile()) { selectedLayout = selectedLayout === 'custom' ? 'smart' : selectedLayout; Settings.application.selectedLayout = selectedLayout; diff --git a/docs/docs/administration/customize.md b/docs/docs/administration/customize.md index 499b2f7de3..48cdbcc131 100644 --- a/docs/docs/administration/customize.md +++ b/docs/docs/administration/customize.md @@ -1516,6 +1516,7 @@ Useful tools for development: | `userdata-bbb_show_public_chat_on_login=` | If set to `false`, the chat panel will not be visible on page load until opened. Not the same as disabling chat. | `true` | | `userdata-bbb_hide_nav_bar=` | If set to `true`, the navigation bar (the top portion of the client) will not be displayed. Introduced in BBB 2.4-rc-3. | `false` | | `userdata-bbb_hide_actions_bar=` | If set to `true`, the actions bar (the bottom portion of the client) will not be displayed. Introduced in BBB 2.4-rc-3. | `false` | +| `userdata-bbb_default_layout=` | The layout name to be loaded first when the application is loaded. If none is provided, the meeting layout will be used. | `none` | #### Examples diff --git a/docs/docs/data/join.tsx b/docs/docs/data/join.tsx index f7442eee11..4f1ae0e8a0 100644 --- a/docs/docs/data/join.tsx +++ b/docs/docs/data/join.tsx @@ -43,12 +43,6 @@ const joinEndpointTableData = [ "type": "String", "description": (<>If you want to pass in a custom voice-extension when a user joins the voice conference using voip. This is useful if you want to collect more info in you Call Detail Records about the user joining the conference. You need to modify your /etc/asterisk/bbb-extensions.conf to handle this new extensions.) }, - { - "name": "defaultLayout", - "required": false, - "type": "String", - "description": (<>The layout name to be loaded first when the application is loaded.) - }, { "name": "avatarURL", "required": false, diff --git a/docs/docs/development/api.md b/docs/docs/development/api.md index ebbbe89eab..a87b117db6 100644 --- a/docs/docs/development/api.md +++ b/docs/docs/development/api.md @@ -109,6 +109,8 @@ Updated in 2.7: Updated in 3.0: +- **join** - **Added:** `userdata-bbb_default_layout`. **Removed:** `defaultLayout` (replaced by `userdata-bbb_default_layout`). + ## API Data Types From 0a1b1e84647f68ad4bb310407e02fbe521074d1c Mon Sep 17 00:00:00 2001 From: Anton Georgiev Date: Wed, 20 Mar 2024 08:55:25 -0400 Subject: [PATCH 2/2] Update docs/docs/administration/customize.md --- docs/docs/administration/customize.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/administration/customize.md b/docs/docs/administration/customize.md index 48cdbcc131..47371835df 100644 --- a/docs/docs/administration/customize.md +++ b/docs/docs/administration/customize.md @@ -1516,7 +1516,7 @@ Useful tools for development: | `userdata-bbb_show_public_chat_on_login=` | If set to `false`, the chat panel will not be visible on page load until opened. Not the same as disabling chat. | `true` | | `userdata-bbb_hide_nav_bar=` | If set to `true`, the navigation bar (the top portion of the client) will not be displayed. Introduced in BBB 2.4-rc-3. | `false` | | `userdata-bbb_hide_actions_bar=` | If set to `true`, the actions bar (the bottom portion of the client) will not be displayed. Introduced in BBB 2.4-rc-3. | `false` | -| `userdata-bbb_default_layout=` | The layout name to be loaded first when the application is loaded. If none is provided, the meeting layout will be used. | `none` | +| `userdata-bbb_default_layout=` | The layout name to be loaded first when the application is loaded. If none is provided, the meeting layout will be used. Introduced in BBB 3.0.0-alpha.5. | `none` | #### Examples