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>
@@ -44,7 +44,7 @@ NEXT_PUBLIC_STORAGE_ADAPTER=localStorage
|
|||||||
|
|
||||||
# External tool URLs (displayed in dashboard)
|
# External tool URLs (displayed in dashboard)
|
||||||
NEXT_PUBLIC_GITEA_URL=http://10.10.10.166:3002
|
NEXT_PUBLIC_GITEA_URL=http://10.10.10.166:3002
|
||||||
# NEXT_PUBLIC_PORTAINER_URL=
|
NEXT_PUBLIC_PORTAINER_URL=http://10.10.10.166:9000
|
||||||
NEXT_PUBLIC_MINIO_URL=http://10.10.10.166:9003
|
NEXT_PUBLIC_MINIO_URL=http://10.10.10.166:9003
|
||||||
NEXT_PUBLIC_N8N_URL=http://10.10.10.166:5678
|
NEXT_PUBLIC_N8N_URL=http://10.10.10.166:5678
|
||||||
NEXT_PUBLIC_STIRLING_PDF_URL=http://10.10.10.166:8087
|
NEXT_PUBLIC_STIRLING_PDF_URL=http://10.10.10.166:8087
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 98 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
@@ -8,6 +8,10 @@ export interface Company {
|
|||||||
color: string;
|
color: string;
|
||||||
address: string;
|
address: string;
|
||||||
city: string;
|
city: string;
|
||||||
|
logo?: {
|
||||||
|
light: string; // logo for light backgrounds
|
||||||
|
dark: string; // logo for dark backgrounds
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export const COMPANIES: Record<CompanyId, Company> = {
|
export const COMPANIES: Record<CompanyId, Company> = {
|
||||||
@@ -28,6 +32,10 @@ export const COMPANIES: Record<CompanyId, Company> = {
|
|||||||
color: '#6366f1',
|
color: '#6366f1',
|
||||||
address: '',
|
address: '',
|
||||||
city: 'Cluj-Napoca',
|
city: 'Cluj-Napoca',
|
||||||
|
logo: {
|
||||||
|
light: '/logos/logo-us-light.svg',
|
||||||
|
dark: '/logos/logo-us-dark.svg',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
'studii-de-teren': {
|
'studii-de-teren': {
|
||||||
id: 'studii-de-teren',
|
id: 'studii-de-teren',
|
||||||
@@ -37,6 +45,10 @@ export const COMPANIES: Record<CompanyId, Company> = {
|
|||||||
color: '#f59e0b',
|
color: '#f59e0b',
|
||||||
address: '',
|
address: '',
|
||||||
city: 'Cluj-Napoca',
|
city: 'Cluj-Napoca',
|
||||||
|
logo: {
|
||||||
|
light: '/logos/logo-sdt-dark.svg',
|
||||||
|
dark: '/logos/logo-sdt-light.svg',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
group: {
|
group: {
|
||||||
id: 'group',
|
id: 'group',
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export const EXTERNAL_TOOLS: ExternalTool[] = [
|
|||||||
id: 'portainer',
|
id: 'portainer',
|
||||||
name: 'Portainer',
|
name: 'Portainer',
|
||||||
description: 'Management containere Docker',
|
description: 'Management containere Docker',
|
||||||
url: '',
|
url: 'http://10.10.10.166:9000',
|
||||||
icon: 'container',
|
icon: 'container',
|
||||||
category: 'dev',
|
category: 'dev',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
|
import Image from 'next/image';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import { usePathname } from 'next/navigation';
|
import { usePathname } from 'next/navigation';
|
||||||
|
import { useTheme } from 'next-themes';
|
||||||
import { useMemo } from 'react';
|
import { useMemo } from 'react';
|
||||||
import * as Icons from 'lucide-react';
|
import * as Icons from 'lucide-react';
|
||||||
import { buildNavigation } from '@/config/navigation';
|
import { buildNavigation } from '@/config/navigation';
|
||||||
|
import { COMPANIES } from '@/config/companies';
|
||||||
import { useFeatureFlag } from '@/core/feature-flags';
|
import { useFeatureFlag } from '@/core/feature-flags';
|
||||||
import { cn } from '@/shared/lib/utils';
|
import { cn } from '@/shared/lib/utils';
|
||||||
import { ScrollArea } from '@/shared/components/ui/scroll-area';
|
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() {
|
export function Sidebar() {
|
||||||
const pathname = usePathname();
|
const pathname = usePathname();
|
||||||
const navGroups = useMemo(() => buildNavigation(), []);
|
const navGroups = useMemo(() => buildNavigation(), []);
|
||||||
@@ -44,7 +69,7 @@ export function Sidebar() {
|
|||||||
return (
|
return (
|
||||||
<aside className="flex h-full w-64 shrink-0 flex-col border-r bg-card">
|
<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">
|
<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>
|
<span className="text-lg font-semibold">ArchiTools</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||