From f871c67da7fc22498417dc66d9230397242f9671 Mon Sep 17 00:00:00 2001 From: chenyu-01 Date: Mon, 8 Apr 2024 11:29:31 +0800 Subject: [PATCH] feat: auth page setting for claude api feat: fix lang support --- app/components/auth.tsx | 13 +++++++++++++ app/locales/cn.ts | 2 +- app/locales/en.ts | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/app/components/auth.tsx b/app/components/auth.tsx index 57118349b..6241825d5 100644 --- a/app/components/auth.tsx +++ b/app/components/auth.tsx @@ -20,6 +20,8 @@ export function AuthPage() { accessStore.update((access) => { access.openaiApiKey = ""; access.accessCode = ""; + access.googleApiKey = ""; + access.anthropicApiKey = ""; }); }; // Reset access code to empty string @@ -75,6 +77,17 @@ export function AuthPage() { ); }} /> + { + accessStore.update( + (access) => (access.anthropicApiKey = e.currentTarget.value), + ); + }} + /> ) : null} diff --git a/app/locales/cn.ts b/app/locales/cn.ts index 2ff94e32d..c7ff211bc 100644 --- a/app/locales/cn.ts +++ b/app/locales/cn.ts @@ -317,7 +317,7 @@ const cn = { ApiKey: { Title: "接口密钥", SubTitle: "使用自定义 Anthropic Key 绕过密码访问限制", - Placeholder: "Anthropic API Key", + Placeholder: "输入您的 Anthropic API 密钥", }, Endpoint: { diff --git a/app/locales/en.ts b/app/locales/en.ts index 59636db7b..3ddba7e8e 100644 --- a/app/locales/en.ts +++ b/app/locales/en.ts @@ -321,7 +321,7 @@ const en: LocaleType = { Title: "Anthropic API Key", SubTitle: "Use a custom Anthropic Key to bypass password access restrictions", - Placeholder: "Anthropic API Key", + Placeholder: "Enter your Anthropic API Key", }, Endpoint: {