Skip to content

Commit d579e6b

Browse files
committed
Merge branch 'dev' of github.com:jumpserver/clients into dev
2 parents 706e199 + f8e5287 commit d579e6b

File tree

3 files changed

+37
-4
lines changed

3 files changed

+37
-4
lines changed

i18n/locales/en.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,14 @@
149149
},
150150
"ConnectError": {
151151
"ConnectFailed": "Connection failed",
152-
"AclFailed": "The current asset is restricted by ACL policies and cannot be accessed via the client. Please use the Web console to connect."
152+
"AclFailed": "The current asset is restricted by ACL policies and cannot be accessed via the client. Please use the Web console to connect.",
153+
"ClientNotFound": "Desktop client not found. Please install or configure the client path.",
154+
"ClientLaunchFailed": "Failed to launch desktop client. Please check installation or permissions.",
155+
"ClientExited": "Desktop client exited unexpectedly.",
156+
"RdpAppMissing": "No RDP application configured or found. Please set the executable path in Settings.",
157+
"VncAppMissing": "No VNC application configured or found. Please set the executable path in Settings.",
158+
"RdpAppFailed": "Failed to start the RDP application.",
159+
"VncAppFailed": "Failed to start the VNC application."
153160
},
154161
"Update": {
155162
"FoundNewVersion": "New version available",

i18n/locales/zh.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,14 @@
153153
},
154154
"ConnectError": {
155155
"ConnectFailed": "连接失败",
156-
"AclFailed": "当前资产受到 ACL 访问限制,无法通过客户端连接,请前往 Web 端进行访问"
156+
"AclFailed": "当前资产受到 ACL 访问限制,无法通过客户端连接,请前往 Web 端进行访问",
157+
"ClientNotFound": "未找到桌面客户端,请安装或在设置中配置路径",
158+
"ClientLaunchFailed": "启动桌面客户端失败,请检查安装或权限",
159+
"ClientExited": "桌面客户端异常退出",
160+
"RdpAppMissing": "未配置或未找到 RDP 客户端,请在设置中选择路径",
161+
"VncAppMissing": "未配置或未找到 VNC 客户端,请在设置中选择路径",
162+
"RdpAppFailed": "启动 RDP 客户端失败",
163+
"VncAppFailed": "启动 VNC 客户端失败"
157164
},
158165
"Update": {
159166
"FoundNewVersion": "发现新版本",

ui/composables/useAssetAction.ts

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,11 +574,30 @@ export const useAssetAction = () => {
574574
}
575575

576576
const payload = event.payload as eventPayload;
577-
const errorMessage = payload.error || t("ConnectError.ConnectFailed");
577+
const raw = payload.error || "";
578+
const lower = raw.toLowerCase();
579+
580+
let description = raw || t("ConnectError.ConnectFailed");
581+
582+
if (lower.includes("executable not found")) {
583+
description = t("ConnectError.ClientNotFound");
584+
} else if (lower.includes("failed to launch client")) {
585+
description = t("ConnectError.ClientLaunchFailed");
586+
} else if (lower.includes("client process exited")) {
587+
description = t("ConnectError.ClientExited");
588+
} else if (lower.includes("no rdp application")) {
589+
description = t("ConnectError.RdpAppMissing");
590+
} else if (lower.includes("no vnc application")) {
591+
description = t("ConnectError.VncAppMissing");
592+
} else if (lower.includes("failed to execute rdp application")) {
593+
description = t("ConnectError.RdpAppFailed");
594+
} else if (lower.includes("failed to execute vnc application")) {
595+
description = t("ConnectError.VncAppFailed");
596+
}
578597

579598
toast.add({
580599
title: t("ConnectError.ConnectFailed"),
581-
description: errorMessage,
600+
description,
582601
color: "error",
583602
icon: "line-md:close-circle"
584603
});

0 commit comments

Comments
 (0)