diff --git a/web/src/components/dashboard/BentoTrend.jsx b/web/src/components/dashboard/BentoTrend.jsx
index 2b2609d..912bfd7 100644
--- a/web/src/components/dashboard/BentoTrend.jsx
+++ b/web/src/components/dashboard/BentoTrend.jsx
@@ -17,8 +17,8 @@ along with this program. If not, see .
For commercial licensing, please contact support@quantumnous.com
*/
-import React, { useMemo } from 'react';
-import { TrendingUp } from 'lucide-react';
+import React, { useMemo, useState } from 'react';
+import { TrendingUp, RefreshCw, ChevronDown } from 'lucide-react';
import Sparkline from './Sparkline';
import { renderQuota } from '../../helpers';
@@ -28,11 +28,21 @@ const formatMD = (d) => {
return `${m}/${day}`;
};
+const GRANULARITY = [
+ { value: 'hour', label: '按小时' },
+ { value: 'day', label: '按天' },
+ { value: 'week', label: '按周' },
+ { value: 'month', label: '按月' },
+];
+
const BentoTrend = ({
dailyStats = [],
topModels = [],
className = '',
+ onRefresh,
+ loading = false,
}) => {
+ const [granularity, setGranularity] = useState('day');
const counts = useMemo(() => dailyStats.map((d) => d.count), [dailyStats]);
const costs = useMemo(() => dailyStats.map((d) => d.cost), [dailyStats]);
@@ -71,6 +81,39 @@ const BentoTrend = ({
+
+
+
+ 近 7 天
+
+
+
+
+
粒度
+
+
+
+
+
+
+
diff --git a/web/src/components/dashboard/index.jsx b/web/src/components/dashboard/index.jsx
index 16f9c49..602186d 100644
--- a/web/src/components/dashboard/index.jsx
+++ b/web/src/components/dashboard/index.jsx
@@ -64,6 +64,8 @@ const Dashboard = () => {