Merge pull request #4460 from chenyu-01/feat-multi-models
Feat [UI/UX Page] [Auth] Add input box for claude api on auth page
This commit is contained in:
commit
f271e1654a
|
@ -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}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ const cn = {
|
||||||
Auth: {
|
Auth: {
|
||||||
Title: "需要密码",
|
Title: "需要密码",
|
||||||
Tips: "管理员开启了密码验证,请在下方填入访问码",
|
Tips: "管理员开启了密码验证,请在下方填入访问码",
|
||||||
SubTips: "或者输入你的 OpenAI 或 Google API 密钥",
|
SubTips: "或者输入你的 OpenAI, Google API 或 Anthropic API 密钥",
|
||||||
Input: "在此处填写访问码",
|
Input: "在此处填写访问码",
|
||||||
Confirm: "确认",
|
Confirm: "确认",
|
||||||
Later: "稍后再说",
|
Later: "稍后再说",
|
||||||
|
@ -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: {
|
||||||
|
|
|
@ -15,7 +15,7 @@ const en: LocaleType = {
|
||||||
Auth: {
|
Auth: {
|
||||||
Title: "Need Access Code",
|
Title: "Need Access Code",
|
||||||
Tips: "Please enter access code below",
|
Tips: "Please enter access code below",
|
||||||
SubTips: "Or enter your OpenAI or Google API Key",
|
SubTips: "Or enter your OpenAI, Google API Key or Anthropic API Key",
|
||||||
Input: "access code",
|
Input: "access code",
|
||||||
Confirm: "Confirm",
|
Confirm: "Confirm",
|
||||||
Later: "Later",
|
Later: "Later",
|
||||||
|
@ -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: {
|
||||||
|
|
Loading…
Reference in New Issue