From 1ae2102b4c3808e18e984812491b95de63dbebf7 Mon Sep 17 00:00:00 2001 From: fish Date: Mon, 6 Jul 2026 10:01:56 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9A=90=E8=97=8F=E7=AD=96=E7=95=A5=E4=B8=8E?= =?UTF-8?q?=20API=20=E9=85=8D=E7=BD=AE=E8=8F=9C=E5=8D=95=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude --- serve/frontend/src/components/Layout.tsx | 94 ------------------- .../src/pages/settings/MenuSettings.tsx | 1 - 2 files changed, 95 deletions(-) diff --git a/serve/frontend/src/components/Layout.tsx b/serve/frontend/src/components/Layout.tsx index aab41a2..d1542aa 100644 --- a/serve/frontend/src/components/Layout.tsx +++ b/serve/frontend/src/components/Layout.tsx @@ -8,17 +8,14 @@ import { AiReportBubble } from '@/components/financials/AiReportBubble' import { StockAnalysisHost } from '@/components/stock-analysis/StockAnalysisHost' import { StockAnalysisBubble } from '@/components/stock-analysis/StockAnalysisBubble' import { - useCapabilities, useSettings, usePreferences, useVersion, } from '@/lib/useSharedQueries' import { QK } from '@/lib/queryKeys' import { - ScanSearch, FileText, Settings, - Key, LayoutDashboard, Tags, TrendingUp, @@ -38,7 +35,6 @@ const BRAND = '#8B5CF6' const nav = [ { to: '/', label: '看板', icon: LayoutDashboard }, - { to: '/screener', label: '策略', icon: ScanSearch }, { to: '/stock-analysis', label: '个股分析', icon: TrendingUp }, { to: '/limit-ladder', label: '连板梯队', icon: Flame }, { to: '/concept-analysis', label: '概念分析', icon: Layers3 }, @@ -48,91 +44,6 @@ const nav = [ { to: '/indices', label: '指数', icon: BarChart3 }, ] as const -// ===== 档位卡片 ===== -function TierBadge({ label, hasKey }: { label: string; hasKey?: boolean }) { - const base = label.split(' ')[0].split('+')[0].toLowerCase() - const isNone = base === 'none' - - const tierConfig: Record = { - none: { - desc: '未配置 Key · 仅历史日K', - tagBg: { background: 'rgba(113,113,122,0.15)' }, - dotStyle: { background: '#52525b' }, - labelTextStyle: { color: '#71717a' }, - }, - free: { - desc: '基础日K · 自选实时', - tagBg: { background: 'rgba(113,113,122,0.3)' }, - dotStyle: { background: '#71717a' }, - labelTextStyle: { color: '#a1a1aa' }, - }, - starter: { - desc: '批量同步 · 行情池', - tagBg: { background: 'rgba(59,130,246,0.2)' }, - dotStyle: { background: '#3b82f6' }, - labelTextStyle: { color: '#60a5fa' }, - }, - pro: { - desc: '分钟K · 实时行情 · 盘口', - tagBg: { background: 'linear-gradient(135deg, rgba(168,85,247,0.2), rgba(124,58,237,0.15))' }, - dotStyle: { background: 'linear-gradient(135deg, #a855f7, #7c3aed)' }, - labelTextStyle: { background: 'linear-gradient(135deg, #c084fc, #a855f7)', WebkitBackgroundClip: 'text', backgroundClip: 'text', color: 'transparent' }, - }, - expert: { - desc: 'WebSocket · 财务数据', - tagBg: { background: 'linear-gradient(135deg, rgba(59,130,246,0.2), rgba(168,85,247,0.2), rgba(245,158,11,0.2))' }, - dotStyle: { background: 'linear-gradient(135deg, #3b82f6, #a855f7, #f59e0b)' }, - labelTextStyle: { background: 'linear-gradient(135deg, #60a5fa, #c084fc, #fbbf24)', WebkitBackgroundClip: 'text', backgroundClip: 'text', color: 'transparent' }, - }, - } - - const t = tierConfig[base] || tierConfig.none - // none 档显示英文「None」,无 label 时也显示「None」 - const displayLabel = isNone ? 'None' : (label || 'None') - - return ( - -
-
-
-
- -
-
-
- TickFlow - -
-
- {isNone && !hasKey ? '配置 Key 解锁更多能力' : t.desc} -
-
- - {displayLabel} - - -
- -
- - ) -} - function AIConfigBadge({ configured, model }: { configured?: boolean; model?: string }) { return ( -