diff --git a/web/src/api/common.ts b/web/src/api/common.ts
index 01568640..2f6033d1 100644
--- a/web/src/api/common.ts
+++ b/web/src/api/common.ts
@@ -31,6 +31,12 @@ export interface versionResponse{
coreUpgrades: string[];
codeName: string;
};
+ introduction_en?: {
+ releaseDate: string;
+ upgradePosition: string;
+ coreUpgrades: string[];
+ codeName: string;
+ };
}
// 首页数据统计
export const getDashboardData = `/home-page/workspaces`
diff --git a/web/src/views/Index/components/TopCardList/index.tsx b/web/src/views/Index/components/TopCardList/index.tsx
index 273ce936..97ced240 100644
--- a/web/src/views/Index/components/TopCardList/index.tsx
+++ b/web/src/views/Index/components/TopCardList/index.tsx
@@ -77,7 +77,8 @@ const TopCardList: FC<{data?: DataResponse}> = ({ data }) => {
{item.key === 'spaces' && String(data?.active_workspaces)}
- {item.key !== 'spaces' && String(data?.[`total_${item.key}` as keyof DataResponse] || item.value || 0)}
+ {item.key === 'running_apps' && String(data?.[`${item.key}` as keyof DataResponse] || item.value || 0)}
+ {item.key !== 'spaces' && item.key !== 'running_apps' && String(data?.[`total_${item.key}` as keyof DataResponse] || item.value || 0)}
{item.key === 'models' ? (
diff --git a/web/src/views/Index/components/VersionCard.tsx b/web/src/views/Index/components/VersionCard.tsx
index 7e632481..5cd94348 100644
--- a/web/src/views/Index/components/VersionCard.tsx
+++ b/web/src/views/Index/components/VersionCard.tsx
@@ -4,29 +4,32 @@
* @Author: yujiangping
* @Date: 2026-01-12 16:34:59
* @LastEditors: yujiangping
- * @LastEditTime: 2026-01-13 19:14:30
+ * @LastEditTime: 2026-01-16 13:00:22
*/
import React, { useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
-import { Button, Divider } from 'antd';
+import { Divider } from 'antd';
// import arrowRight from '@/assets/images/index/arrow_right.svg'
import { getVersion, type versionResponse } from '@/api/common'
const GuideCard: React.FC = () => {
- const { t } = useTranslation();
+ const { t, i18n } = useTranslation();
const [versionInfo, setVersionInfo] = useState(null);
- const [loading, setLoading] = useState(false);
+
+ // 获取当前语言对应的介绍信息
+ const getIntroduction = () => {
+ if (!versionInfo) return null;
+ const currentLang = i18n.language;
+ return currentLang === 'zh' ? versionInfo.introduction : (versionInfo.introduction_en || versionInfo.introduction);
+ };
useEffect(() => {
const fetchVersion = async () => {
try {
- setLoading(true);
const response = await getVersion();
setVersionInfo(response);
} catch (error) {
console.error('Failed to fetch version:', error);
- } finally {
- setLoading(false);
}
};
@@ -41,27 +44,30 @@ const GuideCard: React.FC = () => {
{versionInfo?.version}
-
- {versionInfo && (<>
-
-
-
- {t('version.releaseDate')}: {versionInfo.introduction?.releaseDate}
-
-
-
- {t('version.name')}: {versionInfo.introduction?.codeName}
-
-
-
- {versionInfo.introduction?.upgradePosition}
-
- {versionInfo.introduction?.coreUpgrades?.map((item,index) => (
-
- {index + 1}. {item}
-
- ))}
- >)}
+
+ {versionInfo && (() => {
+ const introduction = getIntroduction();
+ return introduction ? (<>
+
+
+
+ {t('version.releaseDate')}: {introduction.releaseDate}
+
+
+
+ {t('version.name')}: {introduction.codeName}
+
+
+
+ {introduction.upgradePosition}
+
+ {introduction.coreUpgrades?.map((item: string, index: number) => (
+
+ {index + 1}. {item}
+
+ ))}
+ >) : null;
+ })()}
{/* {loading ? (
t('index.loading')
) : (