From 663db10fe94142b3356f9c4378230bbe100b0f09 Mon Sep 17 00:00:00 2001 From: Thanh Dodeur Date: Thu, 12 May 2022 12:48:55 +0000 Subject: [PATCH] [IMP] mail: change the rtc layout system MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit removes the layout menu, the layout is now automatically adjusted based on the focused tile and uses a collapsable sidebar. Layout variables are now located on the callView model instead of messaging, which means that the presence of video tiles may depend on multiple views with each their own layouts. It is therefore no longer possible to rely on the previously global layout state to know if a stream is viewed and should be downloaded. closes odoo/odoo#82692 Signed-off-by: Alexandre Kühn (aku) --- .../call_layout_menu/call_layout_menu.js | 31 ----- .../call_layout_menu/call_layout_menu.xml | 128 ------------------ .../call_option_menu/call_option_menu.scss | 4 + .../call_option_menu/call_option_menu.xml | 13 +- .../call_participant_card.scss | 2 +- .../call_participant_card.xml | 1 - .../src/components/call_view/call_view.scss | 22 +++ .../src/components/call_view/call_view.xml | 28 ++-- .../static/src/models/call_layout_menu.js | 50 ------- .../static/src/models/call_option_menu.js | 12 ++ .../src/models/call_participant_card.js | 50 +++++-- addons/mail/static/src/models/call_view.js | 110 ++++++--------- addons/mail/static/src/models/messaging.js | 29 ---- addons/mail/static/src/models/rtc.js | 21 --- .../static/src/models/rtc_peer_connection.js | 37 +++++ addons/mail/static/src/models/rtc_session.js | 16 ++- addons/mail/static/src/models/user_setting.js | 7 - 17 files changed, 186 insertions(+), 375 deletions(-) delete mode 100644 addons/mail/static/src/components/call_layout_menu/call_layout_menu.js delete mode 100644 addons/mail/static/src/components/call_layout_menu/call_layout_menu.xml delete mode 100644 addons/mail/static/src/models/call_layout_menu.js diff --git a/addons/mail/static/src/components/call_layout_menu/call_layout_menu.js b/addons/mail/static/src/components/call_layout_menu/call_layout_menu.js deleted file mode 100644 index 6a2e841eb80..00000000000 --- a/addons/mail/static/src/components/call_layout_menu/call_layout_menu.js +++ /dev/null @@ -1,31 +0,0 @@ -/** @odoo-module **/ - -import { useComponentToModel } from '@mail/component_hooks/use_component_to_model'; -import { registerMessagingComponent } from '@mail/utils/messaging_component'; -import { LegacyComponent } from "@web/legacy/legacy_component"; - -export class CallLayoutMenu extends LegacyComponent { - - /** - * @override - */ - setup() { - super.setup(); - useComponentToModel({ fieldName: 'component' }); - } - - /** - * @returns {CallLayoutMenu} - */ - get callLayoutMenu() { - return this.props.record; - } - -} - -Object.assign(CallLayoutMenu, { - props: { record: Object }, - template: 'mail.CallLayoutMenu', -}); - -registerMessagingComponent(CallLayoutMenu); diff --git a/addons/mail/static/src/components/call_layout_menu/call_layout_menu.xml b/addons/mail/static/src/components/call_layout_menu/call_layout_menu.xml deleted file mode 100644 index da64a060716..00000000000 --- a/addons/mail/static/src/components/call_layout_menu/call_layout_menu.xml +++ /dev/null @@ -1,128 +0,0 @@ - - - - - -
- -
- -
-
- -
-
-
-
- -
-
- -
-
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/addons/mail/static/src/components/call_option_menu/call_option_menu.scss b/addons/mail/static/src/components/call_option_menu/call_option_menu.scss index 6e40751777f..144b1efaf62 100644 --- a/addons/mail/static/src/components/call_option_menu/call_option_menu.scss +++ b/addons/mail/static/src/components/call_option_menu/call_option_menu.scss @@ -49,3 +49,7 @@ outline: none; } } + +.o_CallOptionMenu_separator { + background-color: $border-color; +} diff --git a/addons/mail/static/src/components/call_option_menu/call_option_menu.xml b/addons/mail/static/src/components/call_option_menu/call_option_menu.xml index 80d4d749cd5..c5f3c67b4dc 100644 --- a/addons/mail/static/src/components/call_option_menu/call_option_menu.xml +++ b/addons/mail/static/src/components/call_option_menu/call_option_menu.xml @@ -4,10 +4,15 @@
- + +
+ +
+
+