diff --git a/apps/web/src/app/admin/dashboard/DashboardContext.tsx b/apps/web/src/app/admin/dashboard/DashboardContext.tsx
index 81899be..f76ece3 100644
--- a/apps/web/src/app/admin/dashboard/DashboardContext.tsx
+++ b/apps/web/src/app/admin/dashboard/DashboardContext.tsx
@@ -12,6 +12,8 @@ interface DashboardContextType {
isDistinctUploadIPsLoading: boolean;
shareCodeList: ShareCodeResponse[];
isShareCodeListLoading: boolean;
+ deletedData: { totalSize?: number; resourceCount?: number; };
+ isDeletedLoading: boolean;
}
interface ShareCodeResourcesSizeByDateRange {
totalSize: number;
@@ -45,6 +47,7 @@ export const DashboardProvider = ({ children }: { children: React.ReactNode }) =
createdAt: 'desc',
},
})
+ const {data:deletedData , isLoading:isDeletedLoading} = api.shareCode.getAllreadlyDeletedShareCodes.useQuery()
return <>
{children}
diff --git a/apps/web/src/app/admin/dashboard/components/Board.tsx b/apps/web/src/app/admin/dashboard/components/Board.tsx
index 0a2e39f..10e3178 100644
--- a/apps/web/src/app/admin/dashboard/components/Board.tsx
+++ b/apps/web/src/app/admin/dashboard/components/Board.tsx
@@ -7,13 +7,13 @@ const { Title, Text } = Typography;
export default function Board() {
const { shareCodeAll, shareCodeToday, shareCodeYesterday,
isShareCodeAllLoading, isShareCodeTodayLoading, isShareCodeYesterdayLoading,
- distinctUploadIPs, isDistinctUploadIPsLoading } = useDashboardContext();
+ distinctUploadIPs, isDistinctUploadIPsLoading,deletedData,isDeletedLoading } = useDashboardContext();
const [serverUptime, setServerUptime] = useState('');
useEffect(() => {
const calculateTimeDifference = () => {
const now = new Date();
const targetDate = new Date('2025-04-09T15:00:00');
- const diffMs = now.getTime()- targetDate.getTime();
+ const diffMs = now.getTime() - targetDate.getTime();
// 如果是负数,表示目标日期已过
if (diffMs < 0) {
@@ -133,6 +133,25 @@ export default function Board() {
+ {/* 删除状态卡片 */}
+ {/*
+
+
+ 已清理文件数
+
+ }
+ className="h-full"
+ >
+
+
+
+ 已经清理文件大小: {isDeletedLoading? 0 : `${(deletedData.totalSize / 1024 / 1024 / 1024).toFixed(2)}GB`}
+
+
+
+ */}
>
}
\ No newline at end of file