feat: add error tip

This commit is contained in:
river 2024-09-19 09:53:00 +08:00
parent e4fda6cacf
commit 065f015f7b

View File

@ -1,5 +1,6 @@
import { getClientConfig } from "../config/client";
import { SubmitKey } from "../store/config";
import { SAAS_CHAT_URL } from "@/app/constant";
const isApp = !!getClientConfig()?.isApp;
@ -7,8 +8,14 @@ const cn = {
WIP: "该功能仍在开发中……",
Error: {
Unauthorized: isApp
? "检测到无效 API Key请前往[设置](/#/settings)页检查 API Key 是否配置正确。"
: "访问密码不正确或为空,请前往[登录](/#/auth)页输入正确的访问密码,或者在[设置](/#/settings)页填入你自己的 OpenAI API Key。",
? `😆 对话遇到了一些问题,不用慌,立刻带你排查:
\\ 1 [ 🚀](${SAAS_CHAT_URL})
\\ 2 OpenAI [](/#/settings) `
: `😆 对话遇到了一些问题,不用慌,立刻带你排查:
\ 1 [ 🚀](${SAAS_CHAT_URL})
\ 2 使[](/#/auth)访 🔑
\ 3 OpenAI [](/#/settings)
`,
},
Auth: {
Return: "返回",