Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@
"DownloadApplication": "Download Application"
},
"ConnectError": {
"ConnectFailed": "Connection failed"
"ConnectFailed": "Connection failed",
"AclFailed": "The current asset is restricted by ACL policies and cannot be accessed via the client. Please use the Web console to connect."
},
"Update": {
"FoundNewVersion": "New version available",
Expand Down
3 changes: 2 additions & 1 deletion i18n/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@
"DownloadApplication": "下载应用"
},
"ConnectError": {
"ConnectFailed": "连接失败"
"ConnectFailed": "连接失败",
"AclFailed": "当前资产受到 ACL 访问限制,无法通过客户端连接,请前往 Web 端进行访问"
},
"Update": {
"FoundNewVersion": "发现新版本",
Expand Down
10 changes: 10 additions & 0 deletions ui/composables/useAssetAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,16 @@ export const useAssetAction = () => {

const payload = event.payload as eventPayload;
const errorData = JSON.parse(payload.data);
const errorCode = errorData?.code as string;

if (errorCode.includes('acl')) {
return toast.add({
title: t("ConnectError.ConnectFailed"),
description: t("ConnectError.AclFailed"),
color: "error",
icon: "line-md:close-circle"
});
}

toast.add({
title: t("ConnectError.ConnectFailed"),
Expand Down