diff --git a/web/src/i18n/en.ts b/web/src/i18n/en.ts index 829def52..4a7a3b54 100644 --- a/web/src/i18n/en.ts +++ b/web/src/i18n/en.ts @@ -131,15 +131,15 @@ export const en = { desc_spaces: 'compared to last week', desc_users: 'New additions this week', desc_running_apps: "Today's success rate", - totalMemoryCapacity: 'Total Stored Memories', + total_memory: 'Total Stored Memories', userMemory: 'User Memory', - knowledgeBaseCount: 'Knowledge Bases', - apiCallCount: 'API Calls', + total_knowledge: 'Knowledge Bases', + total_api_call: 'API Calls', comparedToYesterday: 'compared to yesterday', thisWeek: 'this week', thisDay: 'day on day', failureRate: 'Failure Rate', - application: 'Applications', + total_app: 'Applications', total_num: 'Total Memory Capacity', lastDays: 'last {{days}} days', diff --git a/web/src/i18n/zh.ts b/web/src/i18n/zh.ts index 4c181adf..7ec1d5df 100644 --- a/web/src/i18n/zh.ts +++ b/web/src/i18n/zh.ts @@ -842,15 +842,15 @@ export const zh = { desc_spaces: '多于上周', desc_users: '本周新增', desc_running_apps: '今日成功率', - totalMemoryCapacity: '总记忆容量', + total_memory: '总记忆容量', userMemory: '用户记忆', - knowledgeBaseCount: '知识库数量', - apiCallCount: 'API调用次数', + total_knowledge: '知识库数量', + total_api_call: 'API调用次数', comparedToYesterday: '与昨天相比', thisWeek: '本周', thisDay: '本日', failureRate: '故障率', - application: '应用数量', + total_app: '应用数量', total_num: '总记忆容量', lastDays: '最近{{days}}天', diff --git a/web/src/views/Home/components/TopCardList.tsx b/web/src/views/Home/components/TopCardList.tsx index 751f232a..25f11a55 100644 --- a/web/src/views/Home/components/TopCardList.tsx +++ b/web/src/views/Home/components/TopCardList.tsx @@ -15,49 +15,22 @@ import { useTranslation } from 'react-i18next' import clsx from 'clsx'; import { Flex } from 'antd'; -import totalMemoryCapacity from '@/assets/images/home/totalMemoryCapacity.svg'; -import userMemory from '@/assets/images/home/userMemory.svg'; -import knowledgeBaseCount from '@/assets/images/home/knowledgeBaseCount.svg'; -import apiCallCount from '@/assets/images/home/apiCallCount.svg'; import type { DashboardData } from '../index' /** Card configuration with styling */ const list = [ { - key: 'totalMemoryCapacity', - icon: totalMemoryCapacity, - // value: '45,678', - // trendValue: '12.5%', - // trend: 'up', - // trendDesc: 'comparedToYesterday', + key: 'total_memory', background: 'rb:bg-[url("@/assets/images/home/totalMemoryCapacity.png")] rb:bg-cover rb:bg-no-repeat', }, { - key: 'application', - icon: userMemory, - // value: '32,145', - // trendValue: '12.5%', - // trend: 'down', - // trendDesc: 'comparedToYesterday', - // background: 'linear-gradient( 180deg, #F1FBF5 0%, #F9FDFF 100%)', + key: 'total_app', }, { - key: 'knowledgeBaseCount', - icon: knowledgeBaseCount, - // value: '13,533', - // trendValue: '15.7%', - // trend: 'up', - // trendDesc: 'thisWeek', - // background: 'linear-gradient( 180deg, #E6F5FE 0%, #FBFDFF 100%)', + key: 'total_knowledge', }, { - key: 'apiCallCount', - icon: apiCallCount, - // value: '856.2k', - // trendValue: '23.1%', - // trend: 'up', - // trendDesc: 'comparedToYesterday', - // background: 'linear-gradient( 180deg, #F8F6F5 0%, #FAFDFF 100%)', + key: 'total_api_call', }, ] /** @@ -75,30 +48,32 @@ const TopCardList: FC<{data?: DashboardData}> = ({ data }) => { className={`rb:rounded-2xl rb:bg-[#FFFFFF] rb:py-4 rb:px-3 ${item.background || ''}`} >