This commit is contained in:
gsinghpal
2026-03-13 12:38:28 -04:00
parent db4b9aa278
commit fc3c966484
2975 changed files with 1614 additions and 498 deletions

View File

@@ -0,0 +1,11 @@
// = Navbar Dark Mode
// ============================================================================
.o_main_navbar {
--o-fusion-navbar-active-color: #E4E4E4;
--o-fusion-navbar-active-border: #5D8DA8;
--o-fusion-navbar-active-bg: rgba(93, 141, 168, 0.15);
--o-fusion-navbar-hover-bg: #3C3E4B;
--o-fusion-navbar-focus-bg: #3C3E4B;
--o-fusion-navbar-toggle-color: #5D8DA8;
}

View File

@@ -0,0 +1,23 @@
/** @odoo-module **/
import { patch } from '@web/core/utils/patch';
import { useService } from '@web/core/utils/hooks';
import { useRef } from '@odoo/owl';
import { NavBar } from '@web/webclient/navbar/navbar';
import { AppSwitcher } from "@fusion_backend_theme/webclient/app_switcher/app_switcher";
patch(NavBar.prototype, {
setup() {
super.setup();
this.appMenuService = useService('app_menu');
this.navRef = useRef("nav");
},
});
patch(NavBar, {
components: {
...NavBar.components,
AppSwitcher,
},
});

View File

@@ -0,0 +1,37 @@
// = Main Navbar
// ============================================================================
.o_main_navbar {
border-bottom: none !important;
position: relative;
z-index: 2;
// Ensure consistent navbar entry colors for dark brand background
--NavBar-entry-color: rgba(255, 255, 255, 0.9);
--NavBar-entry-color--active: #{$o-white};
--NavBar-entry-borderColor-active: #{$o-fusion-color-primary};
--NavBar-entry-backgroundColor: #{$o-fusion-color-brand};
--NavBar-entry-backgroundColor--active: #{darken($o-fusion-color-brand, 5%)};
--NavBar-entry-backgroundColor--hover: #{lighten($o-fusion-color-brand, 8%)};
--NavBar-entry-backgroundColor--focus: #{lighten($o-fusion-color-brand, 8%)};
.o_menu_toggle {
color: var(--NavBar-entry-color, rgba(255, 255, 255, 0.9));
}
.o_menu_brand {
transition: opacity 0.15s ease;
}
.o_menu_systray .badge {
font-size: 0.65em;
}
}
// Ensure Discuss keeps the dark navbar consistent with all other apps
.o_web_client:has(.o-mail-Discuss) {
.o_main_navbar {
background: $o-fusion-color-brand !important;
--NavBar-entry-backgroundColor: #{$o-fusion-color-brand};
}
}

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>
<templates xml:space="preserve">
<!-- Extend the NavBar to add the nav ref -->
<t
t-name="fusion_backend_theme.NavBar"
t-inherit="web.NavBar"
t-inherit-mode="extension"
>
<xpath expr="//nav" position="attributes">
<attribute name="t-ref">nav</attribute>
</xpath>
</t>
</templates>