diff --git a/addons/mail/static/src/core/common/chat_window.js b/addons/mail/static/src/core/common/chat_window.js
index 8b6461628c3..9ee6dfd6a7f 100644
--- a/addons/mail/static/src/core/common/chat_window.js
+++ b/addons/mail/static/src/core/common/chat_window.js
@@ -59,6 +59,7 @@ export class ChatWindow extends Component {
this.contentRef = useRef("content");
this.threadActions = useThreadActions();
useChildSubEnv({
+ closeActionPanel: () => this.threadActions.activeAction?.close(),
inChatWindow: true,
messageHighlight: this.messageHighlight,
});
diff --git a/addons/mail/static/src/core/common/chat_window.xml b/addons/mail/static/src/core/common/chat_window.xml
index 140e4695183..1f876f7416e 100644
--- a/addons/mail/static/src/core/common/chat_window.xml
+++ b/addons/mail/static/src/core/common/chat_window.xml
@@ -55,9 +55,10 @@
diff --git a/addons/mail/static/src/core/common/thread_actions.js b/addons/mail/static/src/core/common/thread_actions.js
index 4966f2b2365..e7ad0c9d6c5 100644
--- a/addons/mail/static/src/core/common/thread_actions.js
+++ b/addons/mail/static/src/core/common/thread_actions.js
@@ -108,6 +108,7 @@ function transformAction(component, id, action) {
}
action.open?.(component, this);
},
+ panelOuterClass: action.panelOuterClass,
/** Determines whether this is a popover linked to this action. */
popover: null,
/** Determines the order of this action (smaller first). */
diff --git a/addons/mail/static/src/discuss/call/common/call_settings.js b/addons/mail/static/src/discuss/call/common/call_settings.js
index 6819926b4ad..c5cde382f43 100644
--- a/addons/mail/static/src/discuss/call/common/call_settings.js
+++ b/addons/mail/static/src/discuss/call/common/call_settings.js
@@ -1,14 +1,16 @@
/* @odoo-module */
import { useRtc } from "@mail/discuss/call/common/rtc_hook";
+import { ActionPanel } from "@mail/discuss/core/common/action_panel";
import { Component, onWillStart, useExternalListener, useState } from "@odoo/owl";
-import { browser } from "@web/core/browser/browser";
import { _t } from "@web/core/l10n/translation";
+import { browser } from "@web/core/browser/browser";
import { useService } from "@web/core/utils/hooks";
export class CallSettings extends Component {
+ static components = { ActionPanel };
static template = "discuss.CallSettings";
static props = ["thread", "className?"];
@@ -120,4 +122,8 @@ export class CallSettings extends Component {
onChangeEdgeBlurAmount(ev) {
this.userSettings.edgeBlurAmount = Number(ev.target.value);
}
+
+ get title() {
+ return _t("Voice Settings");
+ }
}
diff --git a/addons/mail/static/src/discuss/call/common/call_settings.xml b/addons/mail/static/src/discuss/call/common/call_settings.xml
index f19e1e6f29a..5d8ced5ce54 100644
--- a/addons/mail/static/src/discuss/call/common/call_settings.xml
+++ b/addons/mail/static/src/discuss/call/common/call_settings.xml
@@ -2,9 +2,8 @@
-
+
-
Voice Settings
-
+
diff --git a/addons/mail/static/src/discuss/call/common/thread_actions.js b/addons/mail/static/src/discuss/call/common/thread_actions.js
index 2156318a93f..3c275e1bf23 100644
--- a/addons/mail/static/src/discuss/call/common/thread_actions.js
+++ b/addons/mail/static/src/discuss/call/common/thread_actions.js
@@ -37,6 +37,7 @@ threadActionsRegistry
(!component.props.chatWindow || component.props.chatWindow.isOpen)
);
},
+ panelOuterClass: "o-discuss-CallSettings",
icon: "fa fa-fw fa-gear",
iconLarge: "fa fa-fw fa-lg fa-gear",
name: _t("Show Call Settings"),
diff --git a/addons/mail/static/src/discuss/core/common/action_panel.js b/addons/mail/static/src/discuss/core/common/action_panel.js
new file mode 100644
index 00000000000..b862b6ef9e5
--- /dev/null
+++ b/addons/mail/static/src/discuss/core/common/action_panel.js
@@ -0,0 +1,17 @@
+/* @odoo-module */
+
+import { Component } from "@odoo/owl";
+
+/**
+ * @typedef {Object} Props
+ * @prop {string} title
+ * @prop {Object} [slots]
+ * @extends {Component
}
+ */
+export class ActionPanel extends Component {
+ static template = "mail.ActionPanel";
+ static props = {
+ title: String,
+ slots: { type: Object, optional: true },
+ };
+}
diff --git a/addons/mail/static/src/discuss/core/common/action_panel.scss b/addons/mail/static/src/discuss/core/common/action_panel.scss
new file mode 100644
index 00000000000..03b72670c63
--- /dev/null
+++ b/addons/mail/static/src/discuss/core/common/action_panel.scss
@@ -0,0 +1,3 @@
+.o-mail-ActionPanel-backButton {
+ color: $o-brand-odoo;
+}
diff --git a/addons/mail/static/src/discuss/core/common/action_panel.xml b/addons/mail/static/src/discuss/core/common/action_panel.xml
new file mode 100644
index 00000000000..36c62ae5f84
--- /dev/null
+++ b/addons/mail/static/src/discuss/core/common/action_panel.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
diff --git a/addons/mail/static/src/discuss/core/common/channel_invitation.js b/addons/mail/static/src/discuss/core/common/channel_invitation.js
index 23c5755d1c4..35b0e85bb97 100644
--- a/addons/mail/static/src/discuss/core/common/channel_invitation.js
+++ b/addons/mail/static/src/discuss/core/common/channel_invitation.js
@@ -1,6 +1,7 @@
/* @odoo-module */
import { ImStatus } from "@mail/core/common/im_status";
+import { ActionPanel } from "@mail/discuss/core/common/action_panel";
import { useMessaging, useStore } from "@mail/core/common/messaging_hook";
import { Component, onMounted, onWillStart, useRef, useState } from "@odoo/owl";
@@ -9,7 +10,7 @@ import { _t } from "@web/core/l10n/translation";
import { useService } from "@web/core/utils/hooks";
export class ChannelInvitation extends Component {
- static components = { ImStatus };
+ static components = { ImStatus, ActionPanel };
static defaultProps = { hasSizeConstraints: false };
static props = ["hasSizeConstraints?", "thread", "close", "className?"];
static template = "discuss.ChannelInvitation";
@@ -140,4 +141,8 @@ export class ChannelInvitation extends Component {
}
return _t("Invite");
}
+
+ get title() {
+ return _t("Invite people");
+ }
}
diff --git a/addons/mail/static/src/discuss/core/common/channel_invitation.xml b/addons/mail/static/src/discuss/core/common/channel_invitation.xml
index ea75e6abaae..677a639cd22 100644
--- a/addons/mail/static/src/discuss/core/common/channel_invitation.xml
+++ b/addons/mail/static/src/discuss/core/common/channel_invitation.xml
@@ -2,54 +2,50 @@
-
-
- Invite people
-
+
+
+
-
-
-
-
-
-
-
![]()
-
+
+
+
+
+
+
![]()
+
+
+
+
-
-
-
-
-
No user found that is not already a member of this channel.
-
- Showing
-
- results out of
-
- . Narrow your search to see more choices.
-
-
-
-
Selected users:
-
-
-
+
No user found that is not already a member of this channel.
+
+ Showing
+
+ results out of
+
+ . Narrow your search to see more choices.
+
-
-
-
-
-
-
- Invitation Link
-
+
+
Selected users:
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
diff --git a/addons/mail/static/src/discuss/core/common/channel_member_list.js b/addons/mail/static/src/discuss/core/common/channel_member_list.js
index 94f65d82c5b..f6b4950f0ca 100644
--- a/addons/mail/static/src/discuss/core/common/channel_member_list.js
+++ b/addons/mail/static/src/discuss/core/common/channel_member_list.js
@@ -1,14 +1,16 @@
/* @odoo-module */
import { ImStatus } from "@mail/core/common/im_status";
+import { ActionPanel } from "@mail/discuss/core/common/action_panel";
import { useMessaging, useStore } from "@mail/core/common/messaging_hook";
import { Component, onWillUpdateProps, onWillStart, useState } from "@odoo/owl";
+import { _t } from "@web/core/l10n/translation";
import { useService } from "@web/core/utils/hooks";
export class ChannelMemberList extends Component {
- static components = { ImStatus };
+ static components = { ImStatus, ActionPanel };
static props = ["thread", "className?"];
static template = "discuss.ChannelMemberList";
@@ -44,4 +46,8 @@ export class ChannelMemberList extends Component {
}
this.threadService.openChat({ partnerId: member.persona.id });
}
+
+ get title() {
+ return _t("Member List");
+ }
}
diff --git a/addons/mail/static/src/discuss/core/common/channel_member_list.xml b/addons/mail/static/src/discuss/core/common/channel_member_list.xml
index 8213a2bdbca..81a0692dcc8 100644
--- a/addons/mail/static/src/discuss/core/common/channel_member_list.xml
+++ b/addons/mail/static/src/discuss/core/common/channel_member_list.xml
@@ -2,16 +2,16 @@
-
+
-
+
Online -
-
+
Offline -
@@ -22,7 +22,7 @@
-
+
diff --git a/addons/mail/static/src/discuss/core/common/thread_actions.js b/addons/mail/static/src/discuss/core/common/thread_actions.js
index fd8a5b5a92b..7d111bda079 100644
--- a/addons/mail/static/src/discuss/core/common/thread_actions.js
+++ b/addons/mail/static/src/discuss/core/common/thread_actions.js
@@ -24,6 +24,7 @@ threadActionsRegistry
(!component.props.chatWindow || component.props.chatWindow.isOpen)
);
},
+ panelOuterClass: "o-discuss-ChannelInvitation",
icon: "fa fa-fw fa-user-plus",
iconLarge: "fa fa-fw fa-lg fa-user-plus",
name: _t("Add Users"),
@@ -40,6 +41,7 @@ threadActionsRegistry
if (!component.props.chatWindow) {
action.popover = usePopover(ChannelInvitation, {
onClose: () => action.close(),
+ popoverClass: action.panelOuterClass,
});
}
},
@@ -53,6 +55,7 @@ threadActionsRegistry
(!component.props.chatWindow || component.props.chatWindow.isOpen)
);
},
+ panelOuterClass: "o-discuss-ChannelMemberList",
icon: "fa fa-fw fa-users",
iconLarge: "fa fa-fw fa-lg fa-users",
name: _t("Show Member List"),
diff --git a/addons/mail/static/src/discuss/message_pin/common/pinned_messages_panel.js b/addons/mail/static/src/discuss/message_pin/common/pinned_messages_panel.js
index da87fe23343..8de45751c4c 100644
--- a/addons/mail/static/src/discuss/message_pin/common/pinned_messages_panel.js
+++ b/addons/mail/static/src/discuss/message_pin/common/pinned_messages_panel.js
@@ -2,6 +2,7 @@
import { Message } from "@mail/core/common/message";
import { useMessagePinService } from "@mail/discuss/message_pin/common/message_pin_service";
+import { ActionPanel } from "@mail/discuss/core/common/action_panel";
import { Component, onWillStart, onWillUpdateProps, useState, useSubEnv } from "@odoo/owl";
@@ -11,6 +12,7 @@ import { useService } from "@web/core/utils/hooks";
export class PinnedMessagesPanel extends Component {
static components = {
Message,
+ ActionPanel,
};
static props = ["thread", "className?"];
static template = "discuss.PinnedMessagesPanel";
@@ -71,4 +73,8 @@ export class PinnedMessagesPanel extends Component {
return _t("This conversation doesn't have any pinned messages.");
}
}
+
+ get title() {
+ return _t("Pinned Messages");
+ }
}
diff --git a/addons/mail/static/src/discuss/message_pin/common/pinned_messages_panel.scss b/addons/mail/static/src/discuss/message_pin/common/pinned_messages_panel.scss
index 6deb2fb7ef1..d5884e4860f 100644
--- a/addons/mail/static/src/discuss/message_pin/common/pinned_messages_panel.scss
+++ b/addons/mail/static/src/discuss/message_pin/common/pinned_messages_panel.scss
@@ -2,10 +2,6 @@
flex-basis: 425px;
}
-.o-discuss-PinnedMessagesPanel-title {
- z-index: 1;
-}
-
.o-discuss-PinnedMessagesPanel-jump {
color: white;
}
diff --git a/addons/mail/static/src/discuss/message_pin/common/pinned_messages_panel.xml b/addons/mail/static/src/discuss/message_pin/common/pinned_messages_panel.xml
index 16e7ce3705b..f3add1b7cdd 100644
--- a/addons/mail/static/src/discuss/message_pin/common/pinned_messages_panel.xml
+++ b/addons/mail/static/src/discuss/message_pin/common/pinned_messages_panel.xml
@@ -1,14 +1,9 @@
-
-
- Pinned messages
-
+
-
+
+
diff --git a/addons/mail/static/src/discuss/message_pin/common/thread_actions.js b/addons/mail/static/src/discuss/message_pin/common/thread_actions.js
index 8ceac937a87..3a3c75a93b7 100644
--- a/addons/mail/static/src/discuss/message_pin/common/thread_actions.js
+++ b/addons/mail/static/src/discuss/message_pin/common/thread_actions.js
@@ -15,6 +15,7 @@ threadActionsRegistry.add("pinned-messages", {
(!component.props.chatWindow || component.props.chatWindow.isOpen)
);
},
+ panelOuterClass: "o-discuss-PinnedMessagesPanel",
icon: "fa fa-fw fa-thumb-tack",
iconLarge: "fa fa-fw fa-lg fa-thumb-tack",
name: _t("Pinned Messages"),