[FIX] mail: restore style of messaging menu icon

- restore "solid" icon
- restore muted style when no notification
- opportunity is taken to fix off-pixel of activity menu

task-2278416

closes odoo/odoo#53094

X-original-commit: 1164b37c5fb33d124ede52356c613b7cd31ac8e1
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit is contained in:
Sébastien Theys
2020-06-16 16:28:03 +00:00
parent 97794679c0
commit ac5138b19a
5 changed files with 13 additions and 8 deletions
@@ -136,3 +136,7 @@
}
}
}
.o_MessagingMenu_toggler.o-no-notification {
@include o-mail-systray-no-notification-style();
}
@@ -5,8 +5,8 @@
<li class="o_MessagingMenu" t-att-class="{ show: messagingMenu.isOpen, 'o-mobile': env.messaging.device.isMobile }">
<!-- TODO FIXME restore mobile stuff here (activeMobileThread) -->
<t t-if="!env.messaging.device.isMobile or true">
<a class="o_MessagingMenu_toggler o-no-caret" t-att-class="{ show: messagingMenu.isOpen }" href="#" t-on-click="_onClickToggler" data-toggle="dropdown" data-display="static" title="Conversations" role="button" aria-expanded="false">
<i class="o_MessagingMenu_icon fa fa-comments-o" role="img" aria-label="Messages"/>
<a class="o_MessagingMenu_toggler o-no-caret" t-att-class="{ show: messagingMenu.isOpen, 'o-no-notification': !messagingMenu.counter }" href="#" t-on-click="_onClickToggler" data-toggle="dropdown" data-display="static" title="Conversations" role="button" aria-expanded="false">
<i class="o_MessagingMenu_icon fa fa-comments" role="img" aria-label="Messages"/>
<t t-if="!env.messaging.isInitialized">
<i class="o_MessagingMenu_loading fa fa-spinner fa-spin"/>
</t>
@@ -130,7 +130,7 @@ QUnit.test('basic rendering', async function (assert) {
"should have icon on clickable element in messaging menu"
);
assert.ok(
document.querySelector(`.o_MessagingMenu_icon`).classList.contains('fa-comments-o'),
document.querySelector(`.o_MessagingMenu_icon`).classList.contains('fa-comments'),
"should have 'comments' icon on clickable element in messaging menu"
);
assert.strictEqual(
+2 -5
View File
@@ -1,16 +1,13 @@
// Systray icon and dropdown
.o_mail_systray_item {
> a {
opacity: 1;
> i {
font-size: larger;
}
}
&.o_no_notification > a {
opacity: 0.5;
> i {
transform: translateY(0px);
}
@include o-mail-systray-no-notification-style();
.o_notification_counter {
display: none;
}
@@ -10,3 +10,7 @@ $o-mail-attachment-image-size: 100px !default;
$o-mail-sidebar-icon-opacity: 0.7 !default;
$o-mail-chat-sidebar-width: 250px !default;
$o-mail-partner-avatar-size: 24px !default;
@mixin o-mail-systray-no-notification-style {
opacity: 0.5;
}