feat: auth page setting for claude api

feat: fix lang support
This commit is contained in:
chenyu-01 2024-04-08 11:29:31 +08:00
parent 0fbb560e90
commit f871c67da7
3 changed files with 15 additions and 2 deletions

View File

@ -20,6 +20,8 @@ export function AuthPage() {
accessStore.update((access) => { accessStore.update((access) => {
access.openaiApiKey = ""; access.openaiApiKey = "";
access.accessCode = ""; access.accessCode = "";
access.googleApiKey = "";
access.anthropicApiKey = "";
}); });
}; // Reset access code to empty string }; // Reset access code to empty string
@ -75,6 +77,17 @@ export function AuthPage() {
); );
}} }}
/> />
<input
className={styles["auth-input"]}
type="password"
placeholder={Locale.Settings.Access.Anthropic.ApiKey.Placeholder}
value={accessStore.anthropicApiKey}
onChange={(e) => {
accessStore.update(
(access) => (access.anthropicApiKey = e.currentTarget.value),
);
}}
/>
</> </>
) : null} ) : null}

View File

@ -317,7 +317,7 @@ const cn = {
ApiKey: { ApiKey: {
Title: "接口密钥", Title: "接口密钥",
SubTitle: "使用自定义 Anthropic Key 绕过密码访问限制", SubTitle: "使用自定义 Anthropic Key 绕过密码访问限制",
Placeholder: "Anthropic API Key", Placeholder: "输入您的 Anthropic API 密钥",
}, },
Endpoint: { Endpoint: {

View File

@ -321,7 +321,7 @@ const en: LocaleType = {
Title: "Anthropic API Key", Title: "Anthropic API Key",
SubTitle: SubTitle:
"Use a custom Anthropic Key to bypass password access restrictions", "Use a custom Anthropic Key to bypass password access restrictions",
Placeholder: "Anthropic API Key", Placeholder: "Enter your Anthropic API Key",
}, },
Endpoint: { Endpoint: {