Add company logos and Portainer URL
Move SDT and Urban Switch logo SVGs to public/logos/ with theme-aware variants. Add logo fields to Company config. Update sidebar header to show theme-responsive logo. Add Portainer URL (port 9000) to external tools config. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
'use client';
|
||||
|
||||
import Image from 'next/image';
|
||||
import Link from 'next/link';
|
||||
import { usePathname } from 'next/navigation';
|
||||
import { useTheme } from 'next-themes';
|
||||
import { useMemo } from 'react';
|
||||
import * as Icons from 'lucide-react';
|
||||
import { buildNavigation } from '@/config/navigation';
|
||||
import { COMPANIES } from '@/config/companies';
|
||||
import { useFeatureFlag } from '@/core/feature-flags';
|
||||
import { cn } from '@/shared/lib/utils';
|
||||
import { ScrollArea } from '@/shared/components/ui/scroll-area';
|
||||
@@ -37,6 +40,28 @@ function NavItem({ item, isActive }: { item: { id: string; label: string; icon:
|
||||
);
|
||||
}
|
||||
|
||||
function SidebarLogo() {
|
||||
const { resolvedTheme } = useTheme();
|
||||
const sdt = COMPANIES['studii-de-teren'];
|
||||
const logoSrc = sdt.logo
|
||||
? (resolvedTheme === 'dark' ? sdt.logo.dark : sdt.logo.light)
|
||||
: null;
|
||||
|
||||
if (!logoSrc) {
|
||||
return <Icons.LayoutDashboard className="h-5 w-5 text-primary" />;
|
||||
}
|
||||
|
||||
return (
|
||||
<Image
|
||||
src={logoSrc}
|
||||
alt={sdt.shortName}
|
||||
width={28}
|
||||
height={28}
|
||||
className="h-7 w-7 shrink-0"
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export function Sidebar() {
|
||||
const pathname = usePathname();
|
||||
const navGroups = useMemo(() => buildNavigation(), []);
|
||||
@@ -44,7 +69,7 @@ export function Sidebar() {
|
||||
return (
|
||||
<aside className="flex h-full w-64 shrink-0 flex-col border-r bg-card">
|
||||
<div className="flex h-14 items-center gap-2 border-b px-4">
|
||||
<Icons.LayoutDashboard className="h-5 w-5 text-primary" />
|
||||
<SidebarLogo />
|
||||
<span className="text-lg font-semibold">ArchiTools</span>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user