From d7e205aee71d1428dc680b33d6532eb2444c0120 Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Sun, 22 Dec 2024 19:45:01 +0800 Subject: [PATCH] feat(ui): improve i18n --- ui/src/i18n/locales/zh/nls.access.json | 4 ++-- ui/src/repository/workflow.ts | 6 ++++-- ui/src/repository/workflowRunLog.ts | 1 + 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ui/src/i18n/locales/zh/nls.access.json b/ui/src/i18n/locales/zh/nls.access.json index 3a2a554f..ea4ecafb 100644 --- a/ui/src/i18n/locales/zh/nls.access.json +++ b/ui/src/i18n/locales/zh/nls.access.json @@ -128,11 +128,11 @@ "access.form.ssh_username.placeholder": "请输入用户名", "access.form.ssh_password.label": "密码", "access.form.ssh_password.placeholder": "请输入密码", - "access.form.ssh_password.tooltip": "使用密码连接到 SSH 时必填。", + "access.form.ssh_password.tooltip": "使用密码连接到 SSH 时必填。
该字段与密钥文件字段二选一。", "access.form.ssh_key.label": "SSH 密钥", "access.form.ssh_key.placeholder": "请输入 SSH 密钥文件", "access.form.ssh_key.upload": "选择文件", - "access.form.ssh_key.tooltip": "使用 SSH 密钥连接到 SSH 时必填。", + "access.form.ssh_key.tooltip": "使用 SSH 密钥连接到 SSH 时必填。
该字段与密码字段二选一。", "access.form.ssh_key_passphrase.label": "SSH 密钥口令", "access.form.ssh_key_passphrase.placeholder": "请输入 SSH 密钥口令", "access.form.ssh_key_passphrase.tooltip": "使用 SSH 密钥连接到 SSH 时选填。" diff --git a/ui/src/repository/workflow.ts b/ui/src/repository/workflow.ts index 4381b362..cc8bb302 100644 --- a/ui/src/repository/workflow.ts +++ b/ui/src/repository/workflow.ts @@ -17,7 +17,7 @@ export const list = async (request: ListWorkflowRequest) => { const page = request.page || 1; const perPage = request.perPage || 10; - const options: RecordListOptions = { sort: "-created" }; + const options: RecordListOptions = { requestKey: null, sort: "-created" }; if (request.enabled != null) { options.filter = pb.filter("enabled={:enabled}", { enabled: request.enabled }); } @@ -26,7 +26,9 @@ export const list = async (request: ListWorkflowRequest) => { }; export const get = async (id: string) => { - return await getPocketBase().collection(COLLECTION_NAME).getOne(id); + return await getPocketBase().collection(COLLECTION_NAME).getOne(id, { + requestKey: null, + }); }; export const save = async (record: Record) => { diff --git a/ui/src/repository/workflowRunLog.ts b/ui/src/repository/workflowRunLog.ts index b32b4efe..780077a6 100644 --- a/ui/src/repository/workflowRunLog.ts +++ b/ui/src/repository/workflowRunLog.ts @@ -16,5 +16,6 @@ export const list = async (request: ListWorkflowLogsRequest) => { .getList(page, perPage, { filter: getPocketBase().filter("workflow={:workflowId}", { workflowId: request.id }), sort: "-created", + requestKey: null, }); };