| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- import {
- LayoutDashboard,
- Activity,
- Key,
- FileText,
- Wallet,
- Box,
- Users,
- Ticket,
- User,
- Command,
- Radio,
- FlaskConical,
- MessageSquare,
- CreditCard,
- ListTodo,
- Settings,
- } 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('General'),
- items: [
- {
- title: t('Overview'),
- url: '/dashboard/overview',
- icon: Activity,
- },
- {
- title: t('Dashboard'),
- url: '/dashboard/models',
- icon: LayoutDashboard,
- },
- {
- title: t('API Keys'),
- url: '/keys',
- icon: Key,
- },
- {
- title: t('Usage Logs'),
- url: '/usage-logs/common',
- icon: FileText,
- },
- {
- title: t('Task Logs'),
- url: '/usage-logs/task',
- activeUrls: ['/usage-logs/drawing'],
- configUrls: ['/usage-logs/drawing', '/usage-logs/task'],
- icon: ListTodo,
- },
- ],
- },
- {
- id: 'personal',
- title: t('Personal'),
- items: [
- {
- title: t('Wallet'),
- url: '/wallet',
- icon: Wallet,
- },
- {
- title: t('Profile'),
- url: '/profile',
- icon: User,
- },
- ],
- },
- {
- id: 'admin',
- title: t('Admin'),
- items: [
- {
- title: t('Channels'),
- url: '/channels',
- icon: Radio,
- },
- {
- title: t('Models'),
- url: '/models/metadata',
- icon: Box,
- },
- {
- title: t('Users'),
- url: '/users',
- icon: Users,
- },
- {
- title: t('Redemption Codes'),
- url: '/redemption-codes',
- icon: Ticket,
- },
- {
- title: t('Subscription Management'),
- url: '/subscriptions',
- icon: CreditCard,
- },
- {
- title: t('System Settings'),
- url: '/system-settings/site',
- activeUrls: ['/system-settings'],
- icon: Settings,
- },
- ],
- },
- ],
- }
- }
|