diff --git a/app/components/settings.tsx b/app/components/settings.tsx index 33bf8b2e7..8fbeb6605 100644 --- a/app/components/settings.tsx +++ b/app/components/settings.tsx @@ -9,6 +9,7 @@ import CopyIcon from "../icons/copy.svg"; import ClearIcon from "../icons/clear.svg"; import LoadingIcon from "../icons/three-dots.svg"; import EditIcon from "../icons/edit.svg"; +import FireIcon from "../icons/fire.svg"; import EyeIcon from "../icons/eye.svg"; import DownloadIcon from "../icons/download.svg"; import UploadIcon from "../icons/upload.svg"; @@ -69,6 +70,7 @@ import { UPDATE_URL, Stability, Iflytek, + SAAS_CHAT_URL, } from "../constant"; import { Prompt, SearchService, usePromptStore } from "../store/prompt"; import { ErrorBoundary } from "./error"; @@ -686,6 +688,28 @@ export function Settings() { ); + const saasStartComponent = ( + + } + text={Locale.Settings.Access.SaasStart.ChatNow} + onClick={() => { + window.location.href = SAAS_CHAT_URL; + }} + /> + + ); + const useCustomConfigComponent = // Conditionally render the following ListItem based on clientConfig.isApp !clientConfig?.isApp && ( // only show if isApp is false + {saasStartComponent} {accessCodeComponent} {!accessStore.hideUserApiKey && ( diff --git a/app/icons/fire.svg b/app/icons/fire.svg new file mode 100644 index 000000000..446d532aa --- /dev/null +++ b/app/icons/fire.svg @@ -0,0 +1 @@ + diff --git a/app/locales/cn.ts b/app/locales/cn.ts index 2c3eb7c27..001ee1d8f 100644 --- a/app/locales/cn.ts +++ b/app/locales/cn.ts @@ -8,12 +8,12 @@ const cn = { WIP: "该功能仍在开发中……", Error: { Unauthorized: isApp - ? `😆 对话遇到了一些问题,不用慌,立刻带你排查: - \\ 1️⃣ 如果你是小白,想要开箱即用,[点击这里立刻开启对话 🚀](${SAAS_CHAT_URL}) + ? `😆 对话遇到了一些问题,不用慌: + \\ 1️⃣ 如果你是小白,想要零配置开箱即用,[点击这里立刻开启对话 🚀](${SAAS_CHAT_URL}) \\ 2️⃣ 如果你想消耗自己的 OpenAI 资源,点击[这里](/#/settings)修改设置 ⚙️` : `😆 对话遇到了一些问题,不用慌,立刻带你排查: - \ 1️⃣ 如果你是小白,想要开箱即用,[点击这里立刻开启对话 🚀](${SAAS_CHAT_URL}) - \ 2️⃣ 如果你在使用私有部署的版本,点击[这里](/#/auth)输入访问秘钥 🔑 + \ 1️⃣ 如果你是小白,想要零配置开箱即用,[点击这里立刻开启对话 🚀](${SAAS_CHAT_URL}) + \ 2️⃣ 如果你正在使用私有部署版本,点击[这里](/#/auth)输入访问秘钥 🔑 \ 3️⃣ 如果你想消耗自己的 OpenAI 资源,点击[这里](/#/settings)修改设置 ⚙️ `, }, @@ -306,6 +306,13 @@ const cn = { }, Access: { + SaasStart: { + Title: "使用 NextChat AI", + Label: "(性价比最高的方案)", + SubTitle: + "由 NextChat 官方维护, 零配置开箱即用,支持最新 GPT-4o、Gemini、Claude3 等最新大模型", + ChatNow: "立刻对话", + }, AccessCode: { Title: "访问密码", SubTitle: "管理员已开启加密访问", diff --git a/app/locales/en.ts b/app/locales/en.ts index ba94f5825..610a5bc09 100644 --- a/app/locales/en.ts +++ b/app/locales/en.ts @@ -1,7 +1,7 @@ import { getClientConfig } from "../config/client"; import { SubmitKey } from "../store/config"; import { LocaleType } from "./index"; - +import { SAAS_CHAT_URL } from "@/app/constant"; // if you are adding a new translation, please use PartialLocaleType instead of LocaleType const isApp = !!getClientConfig()?.isApp; @@ -9,8 +9,14 @@ const en: LocaleType = { WIP: "Coming Soon...", Error: { Unauthorized: isApp - ? "Invalid API Key, please check it in [Settings](/#/settings) page." - : "Unauthorized access, please enter access code in [auth](/#/auth) page, or enter your OpenAI API Key.", + ? `😆 Oops, there's an issue. No worries: + \\ 1️⃣ New here? [Click to start chatting now 🚀](${SAAS_CHAT_URL}) + \\ 2️⃣ Want to use your own OpenAI resources? [Click here](/#/settings) to change settings ⚙️` + : `😆 Oops, there's an issue. Let's fix it: + \ 1️⃣ New here? [Click to start chatting now 🚀](${SAAS_CHAT_URL}) + \ 2️⃣ Using a private setup? [Click here](/#/auth) to enter your key 🔑 + \ 3️⃣ Want to use your own OpenAI resources? [Click here](/#/settings) to change settings ⚙️ + `, }, Auth: { Return: "Return", @@ -303,6 +309,13 @@ const en: LocaleType = { NoAccess: "Enter API Key to check balance", }, Access: { + SaasStart: { + Title: "Use NextChat AI", + Label: " (Most Cost-Effective Option)", + SubTitle: + "Maintained by NextChat, zero setup needed, supports the latest models like GPT-4o, Gemini, Claude3, and more.", + ChatNow: "Start Now", + }, AccessCode: { Title: "Access Code", SubTitle: "Access control Enabled", @@ -463,7 +476,7 @@ const en: LocaleType = { ApiKey: { Title: "API Key", SubTitle: "Obtain your API Key from Google AI", - Placeholder: "Enter your Google AI Studio API Key", + Placeholder: "Google AI API Key", }, Endpoint: {