feat: configure Gitea deployment and environment-managed WorldQuant credentials
Deploy production / deploy (push) Has been cancelled
Deploy production / deploy (push) Has been cancelled
This commit is contained in:
@@ -233,9 +233,16 @@ export function AccountPage({
|
||||
aria-label="WorldQuant 连接设置"
|
||||
>
|
||||
<h2>WorldQuant 连接</h2>
|
||||
{account.credentials_source === "environment" && (
|
||||
<p className="muted">
|
||||
凭据由环境变量管理。修改本地 .env 或 Gitea Secrets
|
||||
后重新部署生效。
|
||||
</p>
|
||||
)}
|
||||
<form
|
||||
onSubmit={(e) => {
|
||||
e.preventDefault();
|
||||
if (account.credentials_source === "environment") return;
|
||||
void action("save", async () => {
|
||||
await api("/account/credentials", {
|
||||
method: "PUT",
|
||||
@@ -246,41 +253,45 @@ export function AccountPage({
|
||||
});
|
||||
}}
|
||||
>
|
||||
<div className="credentials-grid">
|
||||
<label>
|
||||
WorldQuant 邮箱
|
||||
<Input
|
||||
aria-label="WorldQuant 邮箱"
|
||||
value={email}
|
||||
onChange={setEmail}
|
||||
autoComplete="off"
|
||||
/>
|
||||
</label>
|
||||
<label>
|
||||
WorldQuant 密码
|
||||
<Input
|
||||
aria-label="WorldQuant 密码"
|
||||
mode="password"
|
||||
value={password}
|
||||
onChange={setPassword}
|
||||
placeholder={
|
||||
account.configured
|
||||
? "已保存,输入新密码可更新"
|
||||
: "输入平台密码"
|
||||
}
|
||||
autoComplete="new-password"
|
||||
/>
|
||||
</label>
|
||||
</div>
|
||||
{account.credentials_source !== "environment" && (
|
||||
<div className="credentials-grid">
|
||||
<label>
|
||||
WorldQuant 邮箱
|
||||
<Input
|
||||
aria-label="WorldQuant 邮箱"
|
||||
value={email}
|
||||
onChange={setEmail}
|
||||
autoComplete="off"
|
||||
/>
|
||||
</label>
|
||||
<label>
|
||||
WorldQuant 密码
|
||||
<Input
|
||||
aria-label="WorldQuant 密码"
|
||||
mode="password"
|
||||
value={password}
|
||||
onChange={setPassword}
|
||||
placeholder={
|
||||
account.configured
|
||||
? "已保存,输入新密码可更新"
|
||||
: "输入平台密码"
|
||||
}
|
||||
autoComplete="new-password"
|
||||
/>
|
||||
</label>
|
||||
</div>
|
||||
)}
|
||||
<div className="inline-actions">
|
||||
<Button
|
||||
type="tertiary"
|
||||
htmlType="submit"
|
||||
disabled={!email || !password || blocked}
|
||||
loading={busy === "save"}
|
||||
>
|
||||
保存凭据
|
||||
</Button>
|
||||
{account.credentials_source !== "environment" && (
|
||||
<Button
|
||||
type="tertiary"
|
||||
htmlType="submit"
|
||||
disabled={!email || !password || blocked}
|
||||
loading={busy === "save"}
|
||||
>
|
||||
保存凭据
|
||||
</Button>
|
||||
)}
|
||||
<Button
|
||||
theme="solid"
|
||||
disabled={!account.configured || blocked}
|
||||
|
||||
Reference in New Issue
Block a user