feat(ui): improve i18n

This commit is contained in:
Fu Diwei 2024-12-22 19:45:01 +08:00
parent 09919cb3cb
commit d7e205aee7
3 changed files with 7 additions and 4 deletions

View File

@ -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 时必填。<br>该字段与密钥文件字段二选一。",
"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 时必填。<br>该字段与密码字段二选一。",
"access.form.ssh_key_passphrase.label": "SSH 密钥口令",
"access.form.ssh_key_passphrase.placeholder": "请输入 SSH 密钥口令",
"access.form.ssh_key_passphrase.tooltip": "使用 SSH 密钥连接到 SSH 时选填。"

View File

@ -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<WorkflowModel>(id);
return await getPocketBase().collection(COLLECTION_NAME).getOne<WorkflowModel>(id, {
requestKey: null,
});
};
export const save = async (record: Record<string, string | boolean | WorkflowNode>) => {

View File

@ -16,5 +16,6 @@ export const list = async (request: ListWorkflowLogsRequest) => {
.getList<WorkflowRunLog>(page, perPage, {
filter: getPocketBase().filter("workflow={:workflowId}", { workflowId: request.id }),
sort: "-created",
requestKey: null,
});
};