This commit is contained in:
parent
0493cf4a92
commit
b433a34747
|
|
@ -43,6 +43,7 @@ import { Trash2 } from "lucide-react";
|
|||
|
||||
import { useEffect } from "react";
|
||||
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
import {
|
||||
BadgeInfo,
|
||||
|
|
@ -417,6 +418,8 @@ export function DetailPageHeader({ data }: { data: any }) {
|
|||
const [canDeploy, setCanDeploy] = useState(true);
|
||||
const socketRef = useRef<WebSocket | null>(null);
|
||||
|
||||
const { t } = useTranslation();
|
||||
|
||||
const initWebSocket = (userName: string, id: number) => {
|
||||
if (socketRef.current) socketRef.current.close();
|
||||
|
||||
|
|
@ -607,10 +610,10 @@ export function DetailPageHeader({ data }: { data: any }) {
|
|||
setCanDeploy(false); // ✅ 已部署/已停止,不允许再次 deploy
|
||||
|
||||
if (status === "running") {
|
||||
setStatusText("运行中");
|
||||
setStatusText(t("status.running"));
|
||||
setProgressBarColor("bg-green-500");
|
||||
} else if (status === "stopped") {
|
||||
setStatusText("已停止");
|
||||
setStatusText(t("status.stopped"));
|
||||
setProgressBarColor("bg-gray-400");
|
||||
}
|
||||
} else {
|
||||
|
|
@ -781,9 +784,6 @@ export function DetailPageHeader({ data }: { data: any }) {
|
|||
|
||||
)}
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -67,6 +67,24 @@
|
|||
"update_subscriptions": "Update subscriptions",
|
||||
"subscribe": "Subscribe"
|
||||
},
|
||||
"deploy": {
|
||||
"starting": "Starting deployment...",
|
||||
"running": "Running",
|
||||
"stopped": "Stopped",
|
||||
"not_deployed": "Not deployed yet",
|
||||
"progress_prefix": "Progress",
|
||||
"deleting": "Deleting deployment...",
|
||||
"deletion_success": "Deleted successfully",
|
||||
"deletion_failed": "Deletion failed",
|
||||
"request_failed": "Request failed",
|
||||
"ws_error": "WebSocket error",
|
||||
"deploying": "Deploying...",
|
||||
"fetching_status": "Fetching status...",
|
||||
"done": "Deployment complete",
|
||||
"status_prefix": "Status",
|
||||
"retry": "Retry",
|
||||
"loading": "Loading..."
|
||||
},
|
||||
"footer": {
|
||||
"thank_subscription": "Thank you for your subscription",
|
||||
"subscribe_success": "Subscription Successful",
|
||||
|
|
|
|||
|
|
@ -67,6 +67,24 @@
|
|||
"update_subscriptions": "更新订阅",
|
||||
"subscribe": "订阅"
|
||||
},
|
||||
"deploy": {
|
||||
"starting": "正在启动部署...",
|
||||
"running": "运行中",
|
||||
"stopped": "已停止",
|
||||
"not_deployed": "尚未部署",
|
||||
"progress_prefix": "进度",
|
||||
"deleting": "正在删除部署...",
|
||||
"deletion_success": "删除成功",
|
||||
"deletion_failed": "删除失败",
|
||||
"request_failed": "请求失败",
|
||||
"ws_error": "WebSocket 出错",
|
||||
"deploying": "部署中...",
|
||||
"fetching_status": "正在拉取状态...",
|
||||
"done": "部署完成",
|
||||
"status_prefix": "状态",
|
||||
"retry": "重试",
|
||||
"loading": "加载中..."
|
||||
},
|
||||
"footer": {
|
||||
"thank_subscription": "感谢您的订阅",
|
||||
"subscribe_success": "订阅成功",
|
||||
|
|
|
|||
Loading…
Reference in New Issue