refactor(app): 移除 SaaS 聊天入口并增加服务提供商选项

- 在设置页面中移除了 SaaS 聊天入口组件
- 在本地化文件中添加了 "服务提供商" 相关翻译
- 注释掉了与 SaaS 聊天相关的代码和文本
This commit is contained in:
Tianyi 2025-03-01 21:25:09 +08:00
parent f7cde17919
commit c9ad2dd607
2 changed files with 31 additions and 31 deletions

View File

@ -9,7 +9,6 @@ import CopyIcon from "../icons/copy.svg";
import ClearIcon from "../icons/clear.svg"; import ClearIcon from "../icons/clear.svg";
import LoadingIcon from "../icons/three-dots.svg"; import LoadingIcon from "../icons/three-dots.svg";
import EditIcon from "../icons/edit.svg"; import EditIcon from "../icons/edit.svg";
import FireIcon from "../icons/fire.svg";
import EyeIcon from "../icons/eye.svg"; import EyeIcon from "../icons/eye.svg";
import DownloadIcon from "../icons/download.svg"; import DownloadIcon from "../icons/download.svg";
import UploadIcon from "../icons/upload.svg"; import UploadIcon from "../icons/upload.svg";
@ -19,7 +18,6 @@ import ConfirmIcon from "../icons/confirm.svg";
import ConnectionIcon from "../icons/connection.svg"; import ConnectionIcon from "../icons/connection.svg";
import CloudSuccessIcon from "../icons/cloud-success.svg"; import CloudSuccessIcon from "../icons/cloud-success.svg";
import CloudFailIcon from "../icons/cloud-fail.svg"; import CloudFailIcon from "../icons/cloud-fail.svg";
import { trackSettingsPageGuideToCPaymentClick } from "../utils/auth-settings-events";
import { import {
Input, Input,
List, List,
@ -71,7 +69,6 @@ import {
UPDATE_URL, UPDATE_URL,
Stability, Stability,
Iflytek, Iflytek,
SAAS_CHAT_URL,
ChatGLM, ChatGLM,
DeepSeek, DeepSeek,
SiliconFlow, SiliconFlow,
@ -693,30 +690,30 @@ export function Settings() {
</ListItem> </ListItem>
); );
const saasStartComponent = ( // const saasStartComponent = (
<ListItem // <ListItem
className={styles["subtitle-button"]} // className={styles["subtitle-button"]}
title={ // title={
Locale.Settings.Access.SaasStart.Title + // Locale.Settings.Access.SaasStart.Title +
`${Locale.Settings.Access.SaasStart.Label}` // `${Locale.Settings.Access.SaasStart.Label}`
} // }
subTitle={Locale.Settings.Access.SaasStart.SubTitle} // subTitle={Locale.Settings.Access.SaasStart.SubTitle}
> // >
<IconButton // <IconButton
aria={ // aria={
Locale.Settings.Access.SaasStart.Title + // Locale.Settings.Access.SaasStart.Title +
Locale.Settings.Access.SaasStart.ChatNow // Locale.Settings.Access.SaasStart.ChatNow
} // }
icon={<FireIcon />} // icon={<FireIcon />}
type={"primary"} // type={"primary"}
text={Locale.Settings.Access.SaasStart.ChatNow} // text={Locale.Settings.Access.SaasStart.ChatNow}
onClick={() => { // onClick={() => {
trackSettingsPageGuideToCPaymentClick(); // trackSettingsPageGuideToCPaymentClick();
window.location.href = SAAS_CHAT_URL; // window.location.href = SAAS_CHAT_URL;
}} // }}
/> // />
</ListItem> // </ListItem>
); // );
const useCustomConfigComponent = // Conditionally render the following ListItem based on clientConfig.isApp const useCustomConfigComponent = // Conditionally render the following ListItem based on clientConfig.isApp
!clientConfig?.isApp && ( // only show if isApp is false !clientConfig?.isApp && ( // only show if isApp is false
@ -1775,7 +1772,7 @@ export function Settings() {
</List> </List>
<List id={SlotID.CustomModel}> <List id={SlotID.CustomModel}>
{saasStartComponent} {/*{saasStartComponent}*/}
{accessCodeComponent} {accessCodeComponent}
{!accessStore.hideUserApiKey && ( {!accessStore.hideUserApiKey && (

View File

@ -25,9 +25,9 @@ const cn = {
Input: "在此处填写访问码", Input: "在此处填写访问码",
Confirm: "确认", Confirm: "确认",
Later: "稍后再说", Later: "稍后再说",
SaasTips: "配置太麻烦,想要立即使用", // SaasTips: "配置太麻烦,想要立即使用",
TopTips: // TopTips:
"🥳 NextChat AI 首发优惠,立刻解锁 OpenAI o1, GPT-4o, Claude-3.5 等最新大模型", // "🥳 NextChat AI 首发优惠,立刻解锁 OpenAI o1, GPT-4o, Claude-3.5 等最新大模型",
}, },
ChatItem: { ChatItem: {
ChatItemCount: (count: number) => `${count} 条对话`, ChatItemCount: (count: number) => `${count} 条对话`,
@ -540,6 +540,9 @@ const cn = {
}, },
}, },
// 增加厂商选项
ServiceProvider: "服务提供商",
Model: "模型 (model)", Model: "模型 (model)",
CompressModel: { CompressModel: {
Title: "对话摘要模型", Title: "对话摘要模型",