From b28355aacfd09261dd739b6e37bedab603b02761 Mon Sep 17 00:00:00 2001 From: shy3130 <415333856@qq.com> Date: Wed, 24 Jun 2026 18:07:43 +0800 Subject: [PATCH] =?UTF-8?q?feat(dashboard):=20=E7=9C=8B=E6=9D=BF=E6=97=A0?= =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E6=95=B0=E6=8D=AE=E6=97=B6=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E6=9D=A1=20+=20=E8=B7=B3=E8=BD=AC=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=A1=B5=E5=90=8C=E6=AD=A5=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - enriched/daily 两表均无数据时,顶部显示蓝色提示条 - 「前往同步」按钮 Link 跳转 /data 页面 - 与 none 档(无 key)黄色横幅区分显示 版本: 0.1.38 --- backend/app/__init__.py | 2 +- frontend/package.json | 2 +- frontend/src/pages/Dashboard.tsx | 20 +++++++++++++++++++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/backend/app/__init__.py b/backend/app/__init__.py index ad5d9b3..e2f0df1 100644 --- a/backend/app/__init__.py +++ b/backend/app/__init__.py @@ -1,3 +1,3 @@ """TickFlow Stock Panel backend.""" -__version__ = "0.1.37" +__version__ = "0.1.38" diff --git a/frontend/package.json b/frontend/package.json index 8daa063..28dd20b 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,7 +1,7 @@ { "name": "tickflow-stock-panel-frontend", "private": true, - "version": "0.1.37", + "version": "0.1.38", "type": "module", "scripts": { "dev": "vite", diff --git a/frontend/src/pages/Dashboard.tsx b/frontend/src/pages/Dashboard.tsx index 92c87d0..e8702cf 100644 --- a/frontend/src/pages/Dashboard.tsx +++ b/frontend/src/pages/Dashboard.tsx @@ -2,7 +2,7 @@ import { useState, type ReactNode } from 'react' import { Link } from 'react-router-dom' import { useQuery } from '@tanstack/react-query' import { motion } from 'framer-motion' -import { Activity, ArrowDownRight, ArrowUpRight, BarChart3, BellRing, Flame, Gauge, LineChart, Loader2, RefreshCw, Sparkles, Target, Timer, ExternalLink, Gift } from 'lucide-react' +import { Activity, ArrowDownRight, ArrowUpRight, BarChart3, BellRing, Database, Flame, Gauge, LineChart, Loader2, RefreshCw, Sparkles, Target, Timer, ExternalLink, Gift } from 'lucide-react' import { DatePicker } from '@/components/DatePicker' import { api, type MarketSnapshotRow, type OverviewDimensionRankItem, type OverviewMarket, type AlertEvent } from '@/lib/api' import { QK } from '@/lib/queryKeys' @@ -486,6 +486,9 @@ export function Dashboard() { const isSealedDegrade = !hasDepth || !sealedReady // none 档(无 key / 无效 key)→ 显示升级提示横幅 const isNoKey = settings.data?.mode === 'none' + // 无本地数据(enriched/daily 都没有)→ 提示去数据页同步 + const ds = dataStatus.data + const hasNoData = !!ds && (ds.enriched?.rows ?? 0) === 0 && (ds.daily?.rows ?? 0) === 0 // 手动刷新: 显示旋转动画; SSE 自动刷新: 静默, 无体感 const handleRefresh = () => { @@ -544,6 +547,21 @@ export function Dashboard() { )} + {/* 无本地数据提示 —— 引导用户去数据页同步 */} + {hasNoData && ( +