93 lines
1.8 KiB
TypeScript
93 lines
1.8 KiB
TypeScript
import {
|
|
BarChart3,
|
|
BrainCircuit,
|
|
ClipboardCheck,
|
|
Component,
|
|
LayoutDashboard,
|
|
type LucideIcon,
|
|
} from "lucide-react"
|
|
|
|
export type NavigationAvailability = "available" | "unavailable"
|
|
|
|
export interface NavigationItem {
|
|
id: string
|
|
label: string
|
|
to: string | null
|
|
icon: LucideIcon
|
|
availability: NavigationAvailability
|
|
}
|
|
|
|
export const primaryNavigation: readonly NavigationItem[] = [
|
|
{
|
|
id: "home",
|
|
label: "首页",
|
|
to: "/",
|
|
icon: LayoutDashboard,
|
|
availability: "available",
|
|
},
|
|
{
|
|
id: "market",
|
|
label: "行情数据",
|
|
to: null,
|
|
icon: BarChart3,
|
|
availability: "unavailable",
|
|
},
|
|
{
|
|
id: "sync",
|
|
label: "同步任务",
|
|
to: "/sync",
|
|
icon: ClipboardCheck,
|
|
availability: "available",
|
|
},
|
|
{
|
|
id: "selection",
|
|
label: "选股策略",
|
|
to: "/selection",
|
|
icon: BrainCircuit,
|
|
availability: "available",
|
|
},
|
|
{
|
|
id: "components",
|
|
label: "组件预览",
|
|
to: "/components",
|
|
icon: Component,
|
|
availability: "available",
|
|
},
|
|
] as const
|
|
|
|
export const mobileNavigationMaxItems = 5
|
|
|
|
export const mobilePrimaryNavigation: readonly NavigationItem[] =
|
|
primaryNavigation.slice(0, mobileNavigationMaxItems)
|
|
|
|
export const mobileOverflowNavigation: readonly NavigationItem[] = []
|
|
|
|
export interface RoutePresentation {
|
|
id: string
|
|
breadcrumb: string
|
|
title: string
|
|
}
|
|
|
|
export const routePresentation: Record<string, RoutePresentation> = {
|
|
"/": {
|
|
id: "home",
|
|
breadcrumb: "研究工作台",
|
|
title: "市场数据概览",
|
|
},
|
|
"/selection": {
|
|
id: "selection",
|
|
breadcrumb: "研究工作台",
|
|
title: "知行 B1 执行结果",
|
|
},
|
|
"/sync": {
|
|
id: "sync",
|
|
breadcrumb: "研究工作台",
|
|
title: "市场数据完整性检查",
|
|
},
|
|
"/components": {
|
|
id: "components",
|
|
breadcrumb: "研究工作台",
|
|
title: "组件预览",
|
|
},
|
|
}
|