feat: api client, auth store, login, authed shell, data-table + CRUD kit

This commit is contained in:
2026-07-07 22:15:08 +08:00
parent 95a3dee29f
commit eb617ce436
23 changed files with 1002 additions and 352 deletions
+65
View File
@@ -0,0 +1,65 @@
import type { LucideIcon } from 'lucide-react'
import {
Bot,
FolderTree,
Hash,
Inbox,
KeyRound,
Languages,
LayoutList,
ListChecks,
Newspaper,
Palette,
ScrollText,
Smartphone,
Sparkles,
} from 'lucide-react'
export interface NavItem {
label: string
to: string
icon: LucideIcon
/** hide when the user lacks this permission (super-admin always passes) */
permission?: string
}
export interface NavGroup {
label: string
items: NavItem[]
}
export const NAV_GROUPS: NavGroup[] = [
{
label: '分类管理',
items: [
{ label: '分类树', to: '/categories', icon: FolderTree },
{ label: '待审核分类', to: '/categories/pending', icon: ListChecks },
],
},
{
label: '内容工作室',
items: [
{ label: '机器人作者', to: '/studio/robot-authors', icon: Bot },
{ label: '文章系列', to: '/studio/series', icon: LayoutList },
{ label: '文章', to: '/studio/articles', icon: Newspaper },
{ label: '子话题', to: '/studio/subtopics', icon: Sparkles },
{ label: '分类简报', to: '/studio/category-briefs', icon: ScrollText },
{ label: '风格预设', to: '/studio/style-presets', icon: Palette },
{
label: 'Agent 接入',
to: '/studio/agent-tokens',
icon: KeyRound,
permission: 'admin:studio:agent-token:issue',
},
],
},
{
label: '用户与系统',
items: [
{ label: 'SID 管理', to: '/sid', icon: Hash },
{ label: '语言设置', to: '/locales', icon: Languages },
{ label: '推送设备', to: '/devices', icon: Smartphone },
{ label: '机器人会话', to: '/robots', icon: Inbox },
],
},
]