From 4d14ba8a0022155fb5a5bc42a6a5b4eb2a68a9fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20K=C3=BChn?= Date: Tue, 31 May 2022 11:25:52 +0000 Subject: [PATCH] [IMP] mail: rename RTC models (step 2) - rename 'RtcCallViewer' to 'CallView' - rename 'RtcActivityNotice' to 'CallSystrayMenu' - rename 'RtcCallParticipantCard' to 'CallParticipantCard' - rename 'RtcLayoutMenu' to 'CallLayoutMenu' - rename 'RtcConfigurationMenu' to 'CallSettingsMenu' Task-2868876 Part-of: odoo/odoo#92552 --- .../call_action_list/call_action_list.xml | 16 ++--- .../call_option_menu/call_option_menu.xml | 2 +- .../rtc_activity_notice.js | 12 ++-- .../rtc_activity_notice.scss | 4 +- .../rtc_activity_notice.xml | 14 ++-- .../rtc_activity_notice_container.js | 8 +-- .../rtc_activity_notice_container.xml | 6 +- .../rtc_call_participant_card.js | 8 +-- .../rtc_call_participant_card.scss | 16 ++--- .../rtc_call_participant_card.xml | 32 ++++----- .../rtc_call_viewer/rtc_call_viewer.js | 14 ++-- .../rtc_call_viewer/rtc_call_viewer.scss | 10 +-- .../rtc_call_viewer/rtc_call_viewer.xml | 56 +++++++-------- .../rtc_configuration_menu.js | 12 ++-- .../rtc_configuration_menu.scss | 6 +- .../rtc_configuration_menu.xml | 62 ++++++++--------- .../rtc_configuration_menu_device.js | 8 +-- .../rtc_configuration_menu_device.xml | 2 +- .../rtc_layout_menu/rtc_layout_menu.js | 12 ++-- .../rtc_layout_menu/rtc_layout_menu.xml | 68 +++++++++---------- .../components/thread_view/thread_view.xml | 4 +- .../src/models/call_action_list_view.js | 22 +++--- .../static/src/models/call_option_menu.js | 10 +-- .../src/models/call_participant_video_view.js | 8 +-- .../static/src/models/discuss_public_view.js | 2 +- addons/mail/static/src/models/rtc.js | 4 +- .../src/models/rtc_activity_notice_view.js | 4 +- .../src/models/rtc_call_participant_card.js | 16 ++--- .../mail/static/src/models/rtc_call_viewer.js | 32 ++++----- .../src/models/rtc_configuration_menu.js | 4 +- .../mail/static/src/models/rtc_layout_menu.js | 12 ++-- addons/mail/static/src/models/thread_view.js | 8 +-- addons/mail/static/src/models/user_setting.js | 2 +- .../static/src/services/systray_service.js | 4 +- 34 files changed, 250 insertions(+), 250 deletions(-) diff --git a/addons/mail/static/src/components/call_action_list/call_action_list.xml b/addons/mail/static/src/components/call_action_list/call_action_list.xml index 973435a55cc..9908d394ef0 100644 --- a/addons/mail/static/src/components/call_action_list/call_action_list.xml +++ b/addons/mail/static/src/components/call_action_list/call_action_list.xml @@ -5,7 +5,7 @@
- + - - + + - + diff --git a/addons/mail/static/src/components/rtc_activity_notice_container/rtc_activity_notice_container.js b/addons/mail/static/src/components/rtc_activity_notice_container/rtc_activity_notice_container.js index facc5e6de85..5d787d530da 100644 --- a/addons/mail/static/src/components/rtc_activity_notice_container/rtc_activity_notice_container.js +++ b/addons/mail/static/src/components/rtc_activity_notice_container/rtc_activity_notice_container.js @@ -7,7 +7,7 @@ import { getMessagingComponent } from "@mail/utils/messaging_component"; const { Component } = owl; -export class RtcActivityNoticeContainer extends Component { +export class CallSystrayMenuContainer extends Component { /** * @override @@ -19,7 +19,7 @@ export class RtcActivityNoticeContainer extends Component { } -Object.assign(RtcActivityNoticeContainer, { - components: { RtcActivityNotice: getMessagingComponent('RtcActivityNotice') }, - template: 'mail.RtcActivityNoticeContainer', +Object.assign(CallSystrayMenuContainer, { + components: { CallSystrayMenu: getMessagingComponent('CallSystrayMenu') }, + template: 'mail.CallSystrayMenuContainer', }); diff --git a/addons/mail/static/src/components/rtc_activity_notice_container/rtc_activity_notice_container.xml b/addons/mail/static/src/components/rtc_activity_notice_container/rtc_activity_notice_container.xml index ed2ccb30bdf..8a45c18afef 100644 --- a/addons/mail/static/src/components/rtc_activity_notice_container/rtc_activity_notice_container.xml +++ b/addons/mail/static/src/components/rtc_activity_notice_container/rtc_activity_notice_container.xml @@ -1,10 +1,10 @@ - -
+ +
- +
diff --git a/addons/mail/static/src/components/rtc_call_participant_card/rtc_call_participant_card.js b/addons/mail/static/src/components/rtc_call_participant_card/rtc_call_participant_card.js index b4a896276b1..9b7b376b519 100644 --- a/addons/mail/static/src/components/rtc_call_participant_card/rtc_call_participant_card.js +++ b/addons/mail/static/src/components/rtc_call_participant_card/rtc_call_participant_card.js @@ -7,7 +7,7 @@ import Popover from "web.Popover"; const { Component } = owl; -export class RtcCallParticipantCard extends Component { +export class CallParticipantCard extends Component { /** * @override @@ -30,10 +30,10 @@ export class RtcCallParticipantCard extends Component { } -Object.assign(RtcCallParticipantCard, { +Object.assign(CallParticipantCard, { props: { record: Object }, - template: 'mail.RtcCallParticipantCard', + template: 'mail.CallParticipantCard', components: { Popover }, }); -registerMessagingComponent(RtcCallParticipantCard); +registerMessagingComponent(CallParticipantCard); diff --git a/addons/mail/static/src/components/rtc_call_participant_card/rtc_call_participant_card.scss b/addons/mail/static/src/components/rtc_call_participant_card/rtc_call_participant_card.scss index 86c4fd42ac6..4c761fa7e97 100644 --- a/addons/mail/static/src/components/rtc_call_participant_card/rtc_call_participant_card.scss +++ b/addons/mail/static/src/components/rtc_call_participant_card/rtc_call_participant_card.scss @@ -2,11 +2,11 @@ // Layout // ------------------------------------------------------------------ -.o_RtcCallParticipantCard { +.o_CallParticipantCard { aspect-ratio: 16/9; } -.o_RtcCallParticipantCard_avatarImage { +.o_CallParticipantCard_avatarImage { max-height: #{"min(100%, 100px)"}; // interpolated as not supported by Sass max-width: #{"min(100%, 100px)"}; aspect-ratio: 1; @@ -17,7 +17,7 @@ } &.o-isInvitation:not(:hover) { - animation: o_RtcCallParticipantCard_avatarImag_borderPulse 3s linear infinite; + animation: o_CallParticipantCard_avatarImag_borderPulse 3s linear infinite; } &.o-isInvitation:hover { @@ -25,7 +25,7 @@ } } -@keyframes o_RtcCallParticipantCard_avatarImag_borderPulse { +@keyframes o_CallParticipantCard_avatarImag_borderPulse { 0% { border: solid white } 20% { border: solid $gray-600 } 35% { border: solid $gray-100 } @@ -34,12 +34,12 @@ 85% { border: solid $gray-700 } } -.o_RtcCallParticipantCard_overlay { +.o_CallParticipantCard_overlay { pointer-events: none; margin: Min(5%, map-get($spacers, 2)); } -.o_RtcCallParticipantCard_overlayBottom { +.o_CallParticipantCard_overlayBottom { max-width: 50%; } @@ -47,12 +47,12 @@ // Style // ------------------------------------------------------------------ -.o_RtcCallParticipantCard { +.o_CallParticipantCard { &.o-isTalking { box-shadow: inset 0 0 0 map-get($spacers, 1) darken($o-enterprise-primary-color, 5%); } } -.o_RtcCallParticipantCard_liveIndicator { +.o_CallParticipantCard_liveIndicator { user-select: none; } diff --git a/addons/mail/static/src/components/rtc_call_participant_card/rtc_call_participant_card.xml b/addons/mail/static/src/components/rtc_call_participant_card/rtc_call_participant_card.xml index 58add5ce6e8..6be7ebd45be 100644 --- a/addons/mail/static/src/components/rtc_call_participant_card/rtc_call_participant_card.xml +++ b/addons/mail/static/src/components/rtc_call_participant_card/rtc_call_participant_card.xml @@ -1,9 +1,9 @@ - + -
-
+
Avatar @@ -36,39 +36,39 @@ - + - + - + LIVE -
+
- + - + - + - - + + - + LIVE @@ -77,12 +77,12 @@ - +
-
+
diff --git a/addons/mail/static/src/components/rtc_call_viewer/rtc_call_viewer.js b/addons/mail/static/src/components/rtc_call_viewer/rtc_call_viewer.js index 6078eed62a1..cffaf2c6ca7 100644 --- a/addons/mail/static/src/components/rtc_call_viewer/rtc_call_viewer.js +++ b/addons/mail/static/src/components/rtc_call_viewer/rtc_call_viewer.js @@ -13,7 +13,7 @@ const components = { // TODO a nice-to-have would be a resize handle under the videos. -export class RtcCallViewer extends Component { +export class CallView extends Component { /** * @override @@ -34,9 +34,9 @@ export class RtcCallViewer extends Component { //-------------------------------------------------------------------------- /** - * @returns {RtcCallViewer} + * @returns {CallView} */ - get rtcCallViewer() { + get callView() { return this.props.record; } @@ -103,7 +103,7 @@ export class RtcCallViewer extends Component { const { width, height } = this.tileContainerRef.el.getBoundingClientRect(); const { tileWidth, tileHeight, columnCount } = this._computeTessellation({ - aspectRatio: this.rtcCallViewer.aspectRatio, + aspectRatio: this.callView.aspectRatio, containerHeight: height, containerWidth: width, tileCount: this.tileContainerRef.el.children.length, @@ -123,10 +123,10 @@ export class RtcCallViewer extends Component { } -Object.assign(RtcCallViewer, { +Object.assign(CallView, { components, props: { record: Object }, - template: 'mail.RtcCallViewer', + template: 'mail.CallView', }); -registerMessagingComponent(RtcCallViewer); +registerMessagingComponent(CallView); diff --git a/addons/mail/static/src/components/rtc_call_viewer/rtc_call_viewer.scss b/addons/mail/static/src/components/rtc_call_viewer/rtc_call_viewer.scss index f0ff857075c..4f353769825 100644 --- a/addons/mail/static/src/components/rtc_call_viewer/rtc_call_viewer.scss +++ b/addons/mail/static/src/components/rtc_call_viewer/rtc_call_viewer.scss @@ -2,7 +2,7 @@ // Layout // ------------------------------------------------------------------ -.o_RtcCallViewer { +.o_CallView { min-height: 50%; &.o-isMinimized { @@ -11,7 +11,7 @@ } } -.o_RtcCallViewer_grid { +.o_CallView_grid { overflow-y: auto; overflow-x: hidden; @@ -22,7 +22,7 @@ &.o-isTiled { overflow-y: hidden; - .o_RtcCallViewer_participantCard { + .o_CallView_participantCard { width: var(--width); height: var(--height); min-width: var(--width); @@ -36,7 +36,7 @@ } } -.o_RtcCallViewer_gridTile { +.o_CallView_gridTile { aspect-ratio: 16/9; } @@ -44,7 +44,7 @@ // Style // ------------------------------------------------------------------ -.o_RtcCallViewer_grid { +.o_CallView_grid { &::-webkit-scrollbar { background: gray('900'); diff --git a/addons/mail/static/src/components/rtc_call_viewer/rtc_call_viewer.xml b/addons/mail/static/src/components/rtc_call_viewer/rtc_call_viewer.xml index 5dddb8eccc4..7f26366f52b 100644 --- a/addons/mail/static/src/components/rtc_call_viewer/rtc_call_viewer.xml +++ b/addons/mail/static/src/components/rtc_call_viewer/rtc_call_viewer.xml @@ -1,38 +1,38 @@ - - -
+ + +
-
- -
- - +
+ +
+ +
- +
- - + + - @@ -42,26 +42,26 @@
- -
-
- + +
+
+
- - - + + + - - - + + + diff --git a/addons/mail/static/src/components/rtc_configuration_menu/rtc_configuration_menu.js b/addons/mail/static/src/components/rtc_configuration_menu/rtc_configuration_menu.js index 90a4cd3c37c..385136b51ac 100644 --- a/addons/mail/static/src/components/rtc_configuration_menu/rtc_configuration_menu.js +++ b/addons/mail/static/src/components/rtc_configuration_menu/rtc_configuration_menu.js @@ -6,7 +6,7 @@ import { browser } from "@web/core/browser/browser"; const { Component, onWillStart, useState } = owl; -export class RtcConfigurationMenu extends Component { +export class CallSettingsMenu extends Component { /** * @override @@ -24,17 +24,17 @@ export class RtcConfigurationMenu extends Component { } /** - * @returns {RtcConfigurationMenu|undefined} + * @returns {CallSettingsMenu} */ - get rtcConfigurationMenu() { + get callSettingsMenu() { return this.props.record; } } -Object.assign(RtcConfigurationMenu, { +Object.assign(CallSettingsMenu, { props: { record: Object }, - template: 'mail.RtcConfigurationMenu', + template: 'mail.CallSettingsMenu', }); -registerMessagingComponent(RtcConfigurationMenu); +registerMessagingComponent(CallSettingsMenu); diff --git a/addons/mail/static/src/components/rtc_configuration_menu/rtc_configuration_menu.scss b/addons/mail/static/src/components/rtc_configuration_menu/rtc_configuration_menu.scss index 041836632e9..10abe986ea5 100644 --- a/addons/mail/static/src/components/rtc_configuration_menu/rtc_configuration_menu.scss +++ b/addons/mail/static/src/components/rtc_configuration_menu/rtc_configuration_menu.scss @@ -2,15 +2,15 @@ // Layout // ------------------------------------------------------------------ -.o_RtcConfigurationMenu { +.o_CallSettingsMenu { -webkit-user-select: none; user-select: none; } -.o_RtcConfigurationMenu_option { +.o_CallSettingsMenu_option { min-height: 40px; } -.o_RtcConfigurationMenu_optionInputGroupInput { +.o_CallSettingsMenu_optionInputGroupInput { flex-grow: 2; } diff --git a/addons/mail/static/src/components/rtc_configuration_menu/rtc_configuration_menu.xml b/addons/mail/static/src/components/rtc_configuration_menu/rtc_configuration_menu.xml index 1ab7b8f276d..be68208473d 100644 --- a/addons/mail/static/src/components/rtc_configuration_menu/rtc_configuration_menu.xml +++ b/addons/mail/static/src/components/rtc_configuration_menu/rtc_configuration_menu.xml @@ -1,37 +1,37 @@ - -
-
-