[FIX] base_import: fix background color in dark mode

This commit adapts `base_import`'s background that was too dark
compared to other modules. This was caused by the use of a `bg-white`
class that is not very "dark-mode friendly" as it will display as a
pure black, which is not visually appealing and not wanted.

This commit also adapts the background color of the sidebar to make it
more consistent with other modules.

We also add a `bg-view` class to the table, so it stands out more in
light mode and stays the same in dark mode.

task-3814508

closes odoo/odoo#158822

X-original-commit: 57131926a3d2a20d2deb64a4a4f30b31cb6251e4
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
This commit is contained in:
Antoine (anso)
2024-03-26 09:54:25 +00:00
committed by Pierre Paridans
parent 6c4bd3c186
commit e7d0b3b828
3 changed files with 6 additions and 6 deletions
@@ -2,7 +2,7 @@
<templates xml:space="preserve">
<t t-name="ImportAction">
<div class="h-100 d-flex flex-column">
<Layout className="'o_import_action d-flex h-100 overflow-auto bg-white'" display="display">
<Layout className="'o_import_action d-flex h-100 overflow-auto'" display="display">
<t t-set-slot="control-panel-create-button">
<t t-if="isPreviewing">
<button t-if="!state.isPaused" type="button" class="btn btn-primary" t-on-click="() => this.handleImport(false)">Import</button>
@@ -2,7 +2,7 @@
<templates xml:space="preserve">
<t t-name="ImportDataContent">
<div class="o_import_data_content flex-grow-1 overflow-auto border-start">
<div t-if="props.previewError" class="border-bottom p-2 bg-light">
<div t-if="props.previewError" class="border-bottom p-2">
<div class="alert alert-danger mb-0">
<p>
Import preview failed due to: "
@@ -13,7 +13,7 @@
<p t-if="props.columns.length > 0">Here is the start of the file we could not import:</p>
</div>
</div>
<div t-if="!props.options.has_headers" class="border-bottom p-0 bg-light">
<div t-if="!props.options.has_headers" class="border-bottom p-2">
<p class="alert alert-info mb-0">
If the file contains
the column names, Odoo can try auto-detecting the
@@ -21,7 +21,7 @@
simpler especially when the file has many columns.
</p>
</div>
<div t-if="props.importMessages.length > 0" class="border-bottom p-2 bg-light">
<div t-if="props.importMessages.length > 0" class="border-bottom p-2">
<t t-foreach="props.importMessages" t-as="message" t-key="`${message.lines[0]}-${message_index}`">
<p t-att-class="getErrorMessageClass(props.importMessages, message.type, message_index)">
<t t-foreach="message.lines" t-as="line" t-key="`${line}-${line_index}`">
@@ -30,7 +30,7 @@
</p>
</t>
</div>
<table t-if="!props.previewError" class="table table-borderless w-100">
<table t-if="!props.previewError" class="table table-borderless w-100 bg-view">
<thead>
<tr class="border-bottom">
<th scope="col" style="width: 20%;">File Column</th>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="ImportDataSidepanel">
<div class="o_import_data_sidepanel p-3 overflow-auto">
<div class="o_import_data_sidepanel p-3 overflow-auto bg-view">
<div class="pb-4">
<h4>Imported file</h4>
<div class="mb-2 d-flex align-items-center">