[FIX] mail: im status online color in community

Before this commit, im status in community was blue instead
of green.

This commit makes im status green in all version, as it should.

closes odoo/odoo#118744

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit is contained in:
Alexandre Kühn
2023-04-17 14:14:22 +02:00
parent e587307437
commit 4d5516774d
6 changed files with 8 additions and 11 deletions
@@ -2,7 +2,7 @@
<templates xml:space="preserve">
<t t-inherit="mail.ImStatus" t-inherit-mode="extension">
<xpath expr="//span" position="inside">
<i t-if="props.persona.im_status === 'leave_online'" class="fa fa-plane text-primary" title="Online" role="img" aria-label="User is online"/>
<i t-if="props.persona.im_status === 'leave_online'" class="fa fa-plane text-success" title="Online" role="img" aria-label="User is online"/>
<i t-if="props.persona.im_status === 'leave_away'" class="fa fa-plane text-warning" title="Idle" role="img" aria-label="User is idle"/>
<i t-if="props.persona.im_status === 'leave_offline'" class="fa fa-plane text-700" title="Out of office" role="img" aria-label="User is out of office"/>
</xpath>
+2 -2
View File
@@ -4,10 +4,10 @@
<t t-name="mail.ImStatus" owl="1">
<div class="o-mail-ImStatus d-flex justify-content-center flex-shrink-0 align-items-center rounded-circle small o-bg-inherit" t-att-class="props.className">
<span t-if="props.persona.im_status" class="d-flex flex-column">
<i t-if="props.persona.im_status === 'online'" class="fa fa-circle text-primary" title="Online" role="img" aria-label="User is online"/>
<i t-if="props.persona.im_status === 'online'" class="fa fa-circle text-success" title="Online" role="img" aria-label="User is online"/>
<i t-if="props.persona.im_status === 'away'" class="fa fa-circle text-warning" title="Idle" role="img" aria-label="User is idle"/>
<i t-if="props.persona.im_status === 'offline'" class="fa fa-circle-o text-700" title="Offline" role="img" aria-label="User is offline"/>
<i t-if="props.persona.im_status === 'bot'" class="fa fa-heart text-primary" title="Bot" role="img" aria-label="User is a bot"/>
<i t-if="props.persona.im_status === 'bot'" class="fa fa-heart text-success" title="Bot" role="img" aria-label="User is a bot"/>
</span>
</div>
</t>
@@ -1,3 +0,0 @@
.o-mail-ThreadIcon-online {
color: $o-enterprise-primary-color;
}
@@ -11,10 +11,10 @@
<Typing t-if="props.thread.hasTypingMembers" channel="props.thread" size="props.size" displayText="false"/>
<t t-else="">
<t name="chat_static">
<div t-if="chatPartner.im_status === 'online'" class="o-mail-ThreadIcon-online fa fa-fw fa-circle" title="Online"/>
<div t-if="chatPartner.im_status === 'online'" class="fa fa-fw fa-circle text-success" title="Online"/>
<div t-elif="chatPartner.im_status === 'offline'" class="fa fa-fw fa-circle-o" title="Offline"/>
<div t-elif="chatPartner.im_status === 'away'" class="fa fa-fw fa-circle text-warning" title="Away"/>
<div t-elif="chatPartner.im_status === 'bot'" class="o-mail-ThreadIcon-online fa fa-fw fa-heart" title="Bot"/>
<div t-elif="chatPartner.im_status === 'bot'" class="fa fa-fw fa-heart text-success" title="Bot"/>
<t t-else="" name="noImStatusCondition">
<div class="fa fa-fw fa-question-circle" title="No IM status available"/>
</t>
@@ -335,7 +335,7 @@ QUnit.test("chat: correspondent is typing", async (assert) => {
const { env, openDiscuss } = await start();
await openDiscuss();
assert.containsOnce($(".o-mail-DiscussCategoryItem"), ".o-mail-DiscussCategoryItem-threadIcon");
assert.containsOnce($, ".o-mail-ThreadIcon-online");
assert.containsOnce($, ".fa-circle.text-success");
// simulate receive typing notification from demo "is typing"
await afterNextRender(() =>
@@ -356,5 +356,5 @@ QUnit.test("chat: correspondent is typing", async (assert) => {
is_typing: false,
})
);
assert.containsOnce($, ".o-mail-ThreadIcon-online");
assert.containsOnce($, ".fa-circle.text-success");
});
@@ -397,7 +397,7 @@ QUnit.test("sidebar: chat im_status rendering", async (assert) => {
assert.strictEqual(chat2.textContent, "Partner2");
assert.strictEqual(chat3.textContent, "Partner3");
assert.containsOnce(chat1, ".o-mail-ThreadIcon div[title='Offline']");
assert.containsOnce(chat2, ".o-mail-ThreadIcon-online");
assert.containsOnce(chat2, ".fa-circle.text-success");
assert.containsOnce(chat3, ".o-mail-ThreadIcon div[title='Away']");
});