Files
heicode-win/new-api/web/default/src/hooks/use-sidebar-data.ts
T
gongzhiyong aae31e7506 feat(new-api): rebrand manager UI and expose login integration assets
Rebrand the default console experience to Heicode Manager, reshape key navigation toward deployment/ops workflows, and surface login integration docs/screenshots directly in the app for implementation handoff.

Constraint: Keep runtime/module identifiers compatible while shipping user-visible brand and IA changes first
Confidence: medium
Scope-risk: moderate
Not-tested: Full browser regression run across all default/classic pages
Made-with: Cursor
2026-04-30 15:37:33 +08:00

110 lines
2.4 KiB
TypeScript
Vendored

import {
Activity,
Key,
ShieldCheck,
Box,
Users,
User,
Command,
Radio,
FlaskConical,
MessageSquare,
CreditCard,
Rocket,
} from 'lucide-react'
import { useTranslation } from 'react-i18next'
import { WORKSPACE_IDS } from '@/components/layout/lib/workspace-registry'
import { type SidebarData } from '@/components/layout/types'
export function useSidebarData(): SidebarData {
const { t } = useTranslation()
return {
workspaces: [
{
id: WORKSPACE_IDS.DEFAULT,
name: '', // Dynamically fetches system name
logo: Command,
plan: '', // Dynamically fetches system version
},
],
navGroups: [
{
id: 'chat',
title: t('Chat'),
items: [
{
title: t('Playground'),
url: '/playground',
icon: FlaskConical,
},
{
title: t('Chat'),
icon: MessageSquare,
type: 'chat-presets',
},
],
},
{
id: 'general',
title: t('Operations'),
items: [
{
title: t('Deployments'),
url: '/deployments',
icon: Rocket,
},
{
title: t('Events'),
url: '/events',
icon: Activity,
},
{
title: t('Audit'),
url: '/audit',
activeUrls: ['/usage-logs/drawing', '/usage-logs/task'],
configUrls: ['/audit', '/usage-logs/drawing', '/usage-logs/task'],
icon: ShieldCheck,
},
{
title: t('API Keys'),
url: '/keys',
icon: Key,
},
{
title: t('Profile'),
url: '/profile',
icon: User,
},
],
},
{
id: 'admin',
title: t('Control Plane'),
items: [
{
title: t('Provider Channels'),
url: '/channels',
icon: Radio,
},
{
title: t('Model Catalog'),
url: '/models/metadata',
icon: Box,
},
{
title: t('Users'),
url: '/users',
icon: Users,
},
{
title: t('Subscriptions'),
url: '/subscriptions',
icon: CreditCard,
},
],
},
],
}
}