[FIX] board, web: fix dashboard icon SVG

Prior to this commit the knowledge icon from the same dropdown was
turned into an inline-svg but the dashboard one was not.

This commit aims to use an inline-svg for that icon and ensure it
renders correctly.

task-3072562

closes odoo/odoo#138279

X-original-commit: 4df55bbc7bfe0bbe62605cd88887d45460814964
Related: odoo/enterprise#48734
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
This commit is contained in:
Brieuc-brd
2023-10-16 09:21:17 +00:00
parent 538fdab99b
commit b4e96e7230
3 changed files with 22 additions and 7 deletions
@@ -4,7 +4,7 @@
<t t-name="board.AddToBoard">
<Dropdown class="'o_add_to_board'">
<t t-set-slot="toggler">
<img src="/board/static/description/icon.svg" alt="Dashboard Icon" class="o_cp_action_app_icon oi-large me-1"/>
<t t-call="Dashboard.DashboardIcon"/>
Dashboard
</t>
<div class="px-3 pb-2">
@@ -15,4 +15,14 @@
</Dropdown>
</t>
<t t-name="Dashboard.DashboardIcon" owl="1">
<svg viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg" class="oi-large">
<path d="M4 8C4 5.79086 5.79086 4 8 4H25V21C25 23.2091 23.2091 25 21 25H4V8Z" fill="var(--oi-color, #FC868B)"/>
<path d="M4 35C4 32.7909 5.79086 31 8 31H19V42C19 44.2091 17.2091 46 15 46H4V35Z" fill="var(--oi-color, #F9464C)"/>
<path d="M25 46H29C31.2091 46 33 44.2091 33 42V31H29C26.7909 31 25 32.7909 25 35V46Z" fill="var(--oi-color, #FBB945)"/>
<path d="M31 17L31 21C31 23.2091 32.7909 25 35 25L46 25V21C46 18.7909 44.2091 17 42 17L31 17Z" fill="var(--oi-color, #088BF5)"/>
<path d="M31 4L31 8C31 10.2091 32.7909 12 35 12L46 12V8C46 5.79086 44.2091 4 42 4L31 4Z" fill="var(--oi-color, #2EBCFA)"/>
<path d="M38 46H42C44.2091 46 46 44.2091 46 42V31H42C39.7909 31 38 32.7909 38 35V46Z" fill="var(--oi-color, #F78613)"/>
</svg>
</t>
</templates>
@@ -44,3 +44,14 @@
.o-dashboard-action > h3 > span > i {
font-size: 12px;
}
.o_add_to_board {
svg {
width: var(--oi-font-size, 1em);
aspect-ratio: 1;
}
&:not(:hover) {
--oi-color: currentColor;
}
}
@@ -3,10 +3,4 @@
width: var(--oi-font-size, 1em);
vertical-align: -0.2em;
}
.dropdown-item:not(.focus) > .o_cp_action_app_icon {
// Temporary workaround until we'll support inline SVGs icons
// globally (eg. Spreadsheet's toolbar icons)
filter: saturate(0%) brightness(0%) invert(23%) sepia(7%) saturate(1896%) hue-rotate(179deg) brightness(91%) contrast(88%);
}
}