fix: sidebar iconen via CSS !important, unieke niet-blauwe kleuren

This commit is contained in:
mo
2026-07-21 22:36:52 +02:00
parent 07c600242b
commit 859bf801aa
4 changed files with 52 additions and 52 deletions
+4 -4
View File
@@ -7,7 +7,7 @@ import {
Search, Bell, LogOut, Menu, X, ExternalLink, ShieldCheck, PenTool, FileSearch Search, Bell, LogOut, Menu, X, ExternalLink, ShieldCheck, PenTool, FileSearch
} from 'lucide-react'; } from 'lucide-react';
import { useAuth } from '../auth'; import { useAuth } from '../auth';
import { useSettings, iconColor, brandName } from '../settings'; import { useSettings, brandName } from '../settings';
import { api } from '../api'; import { api } from '../api';
const NAV = [ const NAV = [
@@ -81,7 +81,7 @@ export default function Layout({ children }) {
<div className="flex flex-col h-full"> <div className="flex flex-col h-full">
<div className="px-5 py-5 flex items-center gap-3 border-b border-border-soft"> <div className="px-5 py-5 flex items-center gap-3 border-b border-border-soft">
<div className="w-9 h-9 rounded-lg bg-accent-soft flex items-center justify-center glow-accent"> <div className="w-9 h-9 rounded-lg bg-accent-soft flex items-center justify-center glow-accent">
<Network style={{ color: iconColor('network', settings) || '#00d4ff' }} className="w-5 h-5" /> <Network className="w-5 h-5" />
</div> </div>
<div> <div>
<div className="font-bold text-[15px] tracking-tight">{brandName(settings)}</div> <div className="font-bold text-[15px] tracking-tight">{brandName(settings)}</div>
@@ -110,7 +110,7 @@ export default function Layout({ children }) {
}` }`
} }
> >
<item.icon className="w-4 h-4 shrink-0" style={{ color: iconColor(item.iconName, settings) || 'inherit' }} /> <item.icon className="w-4 h-4 shrink-0" />
{item.label} {item.label}
</NavLink> </NavLink>
))} ))}
@@ -129,7 +129,7 @@ export default function Layout({ children }) {
href={item.href} href={item.href}
className="flex items-center gap-2.5 px-2.5 py-2 rounded-lg text-[13px] text-muted hover:text-text hover:bg-card transition-colors" className="flex items-center gap-2.5 px-2.5 py-2 rounded-lg text-[13px] text-muted hover:text-text hover:bg-card transition-colors"
> >
<item.icon className="w-4 h-4 shrink-0" style={{ color: iconColor(item.iconName, settings) || 'inherit' }} /> <item.icon className="w-4 h-4 shrink-0" />
{item.label} {item.label}
<ExternalLink className="w-3 h-3 ml-auto opacity-50" /> <ExternalLink className="w-3 h-3 ml-auto opacity-50" />
</a> </a>
+16 -16
View File
@@ -15,17 +15,17 @@ function generateColor(name) {
} }
export const DEFAULT_ICON_COLORS = { export const DEFAULT_ICON_COLORS = {
'layout-dashboard': '#58a6ff', 'layout-dashboard': '#f0883e',
'users': '#3fb950', 'users': '#3fb950',
'briefcase': '#d29922', 'briefcase': '#d29922',
'check-circle': '#3fb950', 'check-circle': '#3fb950',
'check-circle-2': '#3fb950', 'check-circle-2': '#3fb950',
'check-square': '#3fb950', 'check-square': '#3fb950',
'check-check': '#3fb950', 'check-check': '#3fb950',
'calendar': '#79c0ff', 'calendar': '#f778ba',
'mail': '#58a6ff', 'mail': '#bc8cff',
'mail-plus': '#58a6ff', 'mail-plus': '#bc8cff',
'inbox': '#58a6ff', 'inbox': '#bc8cff',
'folder-kanban': '#d29922', 'folder-kanban': '#d29922',
'clock': '#79c0ff', 'clock': '#79c0ff',
'receipt': '#d29922', 'receipt': '#d29922',
@@ -33,7 +33,7 @@ export const DEFAULT_ICON_COLORS = {
'bar-chart-3': '#bc8cff', 'bar-chart-3': '#bc8cff',
'bar-chart': '#bc8cff', 'bar-chart': '#bc8cff',
'server': '#bc8cff', 'server': '#bc8cff',
'share-2': '#58a6ff', 'share-2': '#f0883e',
'network': '#00d4ff', 'network': '#00d4ff',
'radar': '#d29922', 'radar': '#d29922',
'sparkles': '#bc8cff', 'sparkles': '#bc8cff',
@@ -47,7 +47,7 @@ export const DEFAULT_ICON_COLORS = {
'trash': '#f85149', 'trash': '#f85149',
'search': '#8b9bb8', 'search': '#8b9bb8',
'search-x': '#f85149', 'search-x': '#f85149',
'refresh-cw': '#58a6ff', 'refresh-cw': '#79c0ff',
'download': '#79c0ff', 'download': '#79c0ff',
'upload': '#79c0ff', 'upload': '#79c0ff',
'database-backup': '#bc8cff', 'database-backup': '#bc8cff',
@@ -57,14 +57,14 @@ export const DEFAULT_ICON_COLORS = {
'filter': '#8b9bb8', 'filter': '#8b9bb8',
'building-2': '#bc8cff', 'building-2': '#bc8cff',
'factory': '#bc8cff', 'factory': '#bc8cff',
'map-pin': '#58a6ff', 'map-pin': '#3fb950',
'cable': '#58a6ff', 'cable': '#f0883e',
'workflow': '#bc8cff', 'workflow': '#bc8cff',
'bell': '#d29922', 'bell': '#d29922',
'file-text': '#f778ba', 'file-text': '#f778ba',
'lightbulb': '#d29922', 'lightbulb': '#d29922',
'alert-triangle': '#f85149', 'alert-triangle': '#f85149',
'activity': '#58a6ff', 'activity': '#00d4ff',
'construction': '#d29922', 'construction': '#d29922',
'flag': '#f85149', 'flag': '#f85149',
'user': '#3fb950', 'user': '#3fb950',
@@ -73,11 +73,11 @@ export const DEFAULT_ICON_COLORS = {
'log-out': '#f85149', 'log-out': '#f85149',
'menu': '#8b9bb8', 'menu': '#8b9bb8',
'x': '#8b9bb8', 'x': '#8b9bb8',
'arrow-left': '#79c0ff', 'arrow-left': '#3fb950',
'arrow-right': '#79c0ff', 'arrow-right': '#3fb950',
'chevron-left': '#8b9bb8', 'chevron-left': '#8b9bb8',
'chevron-right': '#8b9bb8', 'chevron-right': '#8b9bb8',
'globe': '#58a6ff', 'globe': '#00d4ff',
'phone': '#3fb950', 'phone': '#3fb950',
'loader-2': '#8b9bb8' 'loader-2': '#8b9bb8'
}; };
@@ -98,7 +98,7 @@ function scanAndInject(styleEl, merged) {
let css = '/* Icon Colors */\n'; let css = '/* Icon Colors */\n';
for (const [name, color] of Object.entries(merged)) { for (const [name, color] of Object.entries(merged)) {
if (!color) continue; if (!color) continue;
css += `.lucide-${name}, [data-lucide="${name}"] { color: ${color} }\n`; css += `.lucide-${name}, [data-lucide="${name}"] { color: ${color} !important }\n`;
processedIcons.add(name); processedIcons.add(name);
} }
const els = document.querySelectorAll('[class*="lucide-"]'); const els = document.querySelectorAll('[class*="lucide-"]');
@@ -108,7 +108,7 @@ function scanAndInject(styleEl, merged) {
const name = cls.replace('lucide-', ''); const name = cls.replace('lucide-', '');
if (!processedIcons.has(name)) { if (!processedIcons.has(name)) {
const c = generateColor(name); const c = generateColor(name);
css += `.lucide-${name}, [data-lucide="${name}"] { color: ${c} }\n`; css += `.lucide-${name}, [data-lucide="${name}"] { color: ${c} !important }\n`;
processedIcons.add(name); processedIcons.add(name);
} }
} }
@@ -139,7 +139,7 @@ function startObserver() {
const name = cls.replace('lucide-', ''); const name = cls.replace('lucide-', '');
if (!processedIcons.has(name)) { if (!processedIcons.has(name)) {
const c = generateColor(name); const c = generateColor(name);
extra += `.lucide-${name}, [data-lucide="${name}"] { color: ${c} }\n`; extra += `.lucide-${name}, [data-lucide="${name}"] { color: ${c} !important }\n`;
processedIcons.add(name); processedIcons.add(name);
} }
} }
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -4,7 +4,7 @@
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Mek-Tech — Consultancy Platform</title> <title>Mek-Tech — Consultancy Platform</title>
<script type="module" crossorigin src="/app/assets/index-BsMRi0iE.js"></script> <script type="module" crossorigin src="/app/assets/index-ChJCS-Nd.js"></script>
<link rel="stylesheet" crossorigin href="/app/assets/index-Cmof3-vz.css"> <link rel="stylesheet" crossorigin href="/app/assets/index-Cmof3-vz.css">
</head> </head>
<body> <body>