[FIX] mail: starred counter should have muted background
Before this commit, all badge color matched the messaging menu color badge. Most badge counter in discuss show needaction counter, so it makes sense to have a catchy color scheme (e.g. white text on red background). For starred counter in discuss sidebar, the counter is meant to see at a glance how many messages are starred, without it being too catchy. This commit fixes the issue by introducing a `o-muted` modifier on `o-discuss-badge`, which displays a grey background for starred counter. Also fixes a bug in dark mode where badge background color was incorrect. closes odoo/odoo#130452 X-original-commit: de232c330140fd4156e7f416fddfce88b21e71c5 Signed-off-by: Didier Debondt (did) <did@odoo.com> Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
.o-discuss-badge {
|
||||
background-color: $primary;
|
||||
--o-discuss-badge-bg: #{$primary}; // sync with --o-navbar-badge-bg
|
||||
}
|
||||
|
||||
@@ -10,6 +10,10 @@
|
||||
--o-discuss-badge-bg: #{$o-success}; // sync with --o-navbar-badge-bg
|
||||
color: $white !important;
|
||||
background-color: var(--o-discuss-badge-bg) !important;
|
||||
|
||||
&.o-muted {
|
||||
--o-discuss-badge-bg: #{$gray-400};
|
||||
}
|
||||
}
|
||||
|
||||
.o-discuss-badge, .o-discuss-badgeShape {
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<span
|
||||
t-if="mailbox.counter > 0"
|
||||
class="o-mail-DiscussSidebar-badge o-discuss-badge badge rounded-pill ms-1 me-3 fw-bold"
|
||||
t-att-class="{ 'bg-400 text-light': mailbox.id === 'starred' }"
|
||||
t-att-class="{ 'o-muted': mailbox.id === 'starred' }"
|
||||
t-esc="mailbox.counter"
|
||||
/>
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user