精简左侧菜单仅保留看板和数据
This commit is contained in:
@@ -18,25 +18,13 @@ import {
|
|||||||
import { QK } from '@/lib/queryKeys'
|
import { QK } from '@/lib/queryKeys'
|
||||||
import { tierRank } from '@/lib/capability-labels'
|
import { tierRank } from '@/lib/capability-labels'
|
||||||
import {
|
import {
|
||||||
Star,
|
|
||||||
ScanSearch,
|
|
||||||
History,
|
|
||||||
FileText,
|
|
||||||
Settings,
|
Settings,
|
||||||
Key,
|
Key,
|
||||||
Database,
|
Database,
|
||||||
Timer,
|
Timer,
|
||||||
Loader2,
|
Loader2,
|
||||||
LayoutDashboard,
|
LayoutDashboard,
|
||||||
Tags,
|
|
||||||
TrendingUp,
|
|
||||||
Flame,
|
|
||||||
BarChart3,
|
|
||||||
Sparkles,
|
Sparkles,
|
||||||
Layers3,
|
|
||||||
Landmark,
|
|
||||||
Cable,
|
|
||||||
RadioTower,
|
|
||||||
CheckCircle2,
|
CheckCircle2,
|
||||||
} from 'lucide-react'
|
} from 'lucide-react'
|
||||||
import { Logo } from './Logo'
|
import { Logo } from './Logo'
|
||||||
@@ -59,17 +47,6 @@ type CoreIndex = (typeof CORE_INDEXES)[number]
|
|||||||
|
|
||||||
const nav = [
|
const nav = [
|
||||||
{ to: '/', label: '看板', icon: LayoutDashboard },
|
{ to: '/', label: '看板', icon: LayoutDashboard },
|
||||||
{ to: '/watchlist', label: '自选', icon: Star },
|
|
||||||
{ to: '/screener', label: '策略', icon: ScanSearch },
|
|
||||||
{ to: '/backtest', label: '回测', icon: History },
|
|
||||||
{ to: '/limit-ladder', label: '连板梯队', icon: Flame },
|
|
||||||
{ to: '/concept-analysis', label: '概念分析', icon: Layers3 },
|
|
||||||
{ to: '/industry-analysis', label: '行业分析', icon: Landmark },
|
|
||||||
{ to: '/stock-analysis', label: '个股分析', icon: TrendingUp },
|
|
||||||
{ to: '/financials', label: '财务', icon: FileText },
|
|
||||||
{ to: '/indices', label: '指数', icon: BarChart3 },
|
|
||||||
{ to: '/trading', label: '交易', icon: Cable },
|
|
||||||
{ to: '/monitor', label: '监控中心', icon: RadioTower },
|
|
||||||
{ to: '/data', label: '数据', icon: Database },
|
{ to: '/data', label: '数据', icon: Database },
|
||||||
] as const
|
] as const
|
||||||
|
|
||||||
@@ -258,11 +235,6 @@ export function Layout() {
|
|||||||
const { data: versionData } = useVersion()
|
const { data: versionData } = useVersion()
|
||||||
const { data: prefs } = usePreferences()
|
const { data: prefs } = usePreferences()
|
||||||
const { data: quoteStatus } = useQuoteStatus()
|
const { data: quoteStatus } = useQuoteStatus()
|
||||||
const { data: analysisMenus } = useQuery({
|
|
||||||
queryKey: QK.analysisMenus,
|
|
||||||
queryFn: api.analysisMenus,
|
|
||||||
})
|
|
||||||
|
|
||||||
// 数据同步状态轮询: 有活跃 job 时「数据」菜单项显示转圈
|
// 数据同步状态轮询: 有活跃 job 时「数据」菜单项显示转圈
|
||||||
const { data: pipelineJobs } = useQuery({
|
const { data: pipelineJobs } = useQuery({
|
||||||
queryKey: QK.pipelineJobs,
|
queryKey: QK.pipelineJobs,
|
||||||
@@ -326,10 +298,8 @@ export function Layout() {
|
|||||||
if (alertsTotal != null) setAlertTotal(alertsTotal)
|
if (alertsTotal != null) setAlertTotal(alertsTotal)
|
||||||
}, [alertsTotal])
|
}, [alertsTotal])
|
||||||
|
|
||||||
// 合并内置页面 + 可见的扩展分析菜单
|
// 当前仅开放看板和数据业务,扩展分析菜单暂不展示
|
||||||
const analysisNav = (analysisMenus?.items ?? [])
|
const analysisNav: { to: string; label: string; icon: typeof LayoutDashboard }[] = []
|
||||||
.filter(m => m.visible)
|
|
||||||
.map(m => ({ to: `/analysis/${m.id}`, label: m.label, icon: m.icon === 'tags' ? Tags : BarChart3 }))
|
|
||||||
|
|
||||||
const allNav = [...nav, ...analysisNav]
|
const allNav = [...nav, ...analysisNav]
|
||||||
const savedOrder = prefs?.nav_order ?? []
|
const savedOrder = prefs?.nav_order ?? []
|
||||||
|
|||||||
Reference in New Issue
Block a user