🐛 fix(redis): 支持配置 ACL 用户名 (#859)

Fixes #859
This commit is contained in:
mango
2026-08-07 12:17:49 +08:00
parent f02df7c87d
commit 94e972f993
2 changed files with 13 additions and 2 deletions

View File

@@ -806,6 +806,7 @@ describe("ConnectionModal i18n", () => {
pageText = textContent(renderer!.toJSON());
expect(pageText).toContain("Cluster mode");
expect(pageText).toContain("Leave empty when authentication is disabled");
expect(pageText).toContain("Redis password");
expect(pageText).toContain("Scope");
});

View File

@@ -1513,10 +1513,20 @@ const ConnectionModalStep2: React.FC<ConnectionModalStep2Props> = (props) => {
{isRedis && (
<div className="gn-conn-f-row">
{denseLabel(
t("connection.modal.dense.password"),
t("connection.modal.field.redisPassword.label"),
t("connection.modal.dense.auth"),
t("connection.modal.field.username.label"),
)}
<div className="gn-conn-f-ctrl gn-conn-f-inline">
<div className="gn-conn-w gn-conn-w-user">
<Form.Item name="user" style={{ marginBottom: 0 }}>
<Input
{...noAutoCapInputProps}
placeholder={t(
"connection.modal.field.username.optional_placeholder",
)}
/>
</Form.Item>
</div>
<div className="gn-conn-w gn-conn-w-pass">
<Form.Item name="password" style={{ marginBottom: 0 }}>
<Input.Password