diff --git a/addons/mail/static/src/discuss/call/common/call.xml b/addons/mail/static/src/discuss/call/common/call.xml index 7b294a1b16b..7d721effc0c 100644 --- a/addons/mail/static/src/discuss/call/common/call.xml +++ b/addons/mail/static/src/discuss/call/common/call.xml @@ -25,7 +25,7 @@
-
+
diff --git a/addons/mail/static/src/discuss/call/common/call_action_list.js b/addons/mail/static/src/discuss/call/common/call_action_list.js index 290dc50dd88..6104ec148d1 100644 --- a/addons/mail/static/src/discuss/call/common/call_action_list.js +++ b/addons/mail/static/src/discuss/call/common/call_action_list.js @@ -5,8 +5,12 @@ import { useRtc } from "@mail/discuss/call/common/rtc_hook"; import { Component } from "@odoo/owl"; import { isMobileOS } from "@web/core/browser/feature_detection"; +import { Dropdown } from "@web/core/dropdown/dropdown"; +import { DropdownItem } from "@web/core/dropdown/dropdown_item"; +import { _t } from "@web/core/l10n/translation"; export class CallActionList extends Component { + static components = { Dropdown, DropdownItem }; static props = ["thread", "fullscreen", "compact?"]; static template = "discuss.CallActionList"; @@ -14,6 +18,44 @@ export class CallActionList extends Component { this.rtc = useRtc(); } + get MORE() { + return _t("More"); + } + + get moreActions() { + const acts = []; + acts.push({ + id: "raiseHand", + name: !this.rtc.state?.selfSession.raisingHand ? _t("Raise Hand") : _t("Lower Hand"), + icon: "fa fa-fw fa-hand-paper-o", + onSelect: (ev) => this.onClickRaiseHand(ev), + }); + if (isMobileOS) { + acts.push({ + id: "shareScreen", + name: !this.rtc.state.sendScreen ? _t("Share Screen") : _t("Stop Sharing Screen"), + icon: "fa fa-fw fa-desktop", + onSelect: () => this.rtc.toggleVideo("screen"), + }); + } + if (!this.props.fullscreen.isActive) { + acts.push({ + id: "fullScreen", + name: _t("Enter Full Screen"), + icon: "fa fa-fw fa-arrows-alt", + onSelect: () => this.props.fullscreen.enter(), + }); + } else { + acts.push({ + id: "exitFullScreen", + name: _t("Exit Full Screen"), + icon: "fa fa-fw fa-compress", + onSelect: () => this.props.fullscreen.exit(), + }); + } + return acts; + } + get isOfActiveCall() { return Boolean(this.props.thread.id === this.rtc.state?.channel?.id); } diff --git a/addons/mail/static/src/discuss/call/common/call_action_list.xml b/addons/mail/static/src/discuss/call/common/call_action_list.xml index 5e675ae7ff4..d7b2248e31e 100644 --- a/addons/mail/static/src/discuss/call/common/call_action_list.xml +++ b/addons/mail/static/src/discuss/call/common/call_action_list.xml @@ -7,8 +7,8 @@ Unmute Mute - Undeafen Deafen -
- Lower hand - Raise hand - Stop camera Turn camera on - - Stop screen sharing - Share screen - - - + + +
+ +
+
+ + + + + + +
-