mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-01 23:56:39 +08:00
123
This commit is contained in:
parent
dd884acab3
commit
9ccf8550b0
@ -1480,7 +1480,7 @@ function _Chat() {
|
||||
color={"var(--second)"}
|
||||
placement="bottom"
|
||||
>
|
||||
当天使用:
|
||||
{Locale.Chat.UseTip}
|
||||
<Progress
|
||||
percent={
|
||||
(parseInt(localStorage.getItem("current_day_token") ?? "0") /
|
||||
|
@ -124,6 +124,7 @@ export function PreCode(props: { children: any }) {
|
||||
});
|
||||
setTimeout(renderArtifacts, 1);
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
|
||||
return (
|
||||
|
@ -65,6 +65,7 @@ export function SearchChatPage() {
|
||||
results.sort((a, b) => b.content.length - a.content.length);
|
||||
|
||||
return results;
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
|
@ -1378,21 +1378,21 @@ export function Settings() {
|
||||
</Select>
|
||||
</ListItem>
|
||||
|
||||
{/*<ListItem title={Locale.Settings.Lang.Name}>*/}
|
||||
{/* <Select*/}
|
||||
{/* aria-label={Locale.Settings.Lang.Name}*/}
|
||||
{/* value={getLang()}*/}
|
||||
{/* onChange={(e) => {*/}
|
||||
{/* changeLang(e.target.value as any);*/}
|
||||
{/* }}*/}
|
||||
{/* >*/}
|
||||
{/* {AllLangs.map((lang) => (*/}
|
||||
{/* <option value={lang} key={lang}>*/}
|
||||
{/* {ALL_LANG_OPTIONS[lang]}*/}
|
||||
{/* </option>*/}
|
||||
{/* ))}*/}
|
||||
{/* </Select>*/}
|
||||
{/*</ListItem>*/}
|
||||
<ListItem title={Locale.Settings.Lang.Name}>
|
||||
<Select
|
||||
aria-label={Locale.Settings.Lang.Name}
|
||||
value={getLang()}
|
||||
onChange={(e) => {
|
||||
changeLang(e.target.value as any);
|
||||
}}
|
||||
>
|
||||
{AllLangs.map((lang) => (
|
||||
<option value={lang} key={lang}>
|
||||
{ALL_LANG_OPTIONS[lang]}
|
||||
</option>
|
||||
))}
|
||||
</Select>
|
||||
</ListItem>
|
||||
|
||||
<ListItem
|
||||
title={Locale.Settings.FontSize.Title}
|
||||
|
@ -15,6 +15,7 @@ import DragIcon from "../icons/drag.svg";
|
||||
import DiscoveryIcon from "../icons/discovery.svg";
|
||||
|
||||
import Locale from "../locales";
|
||||
import { getLang } from "../locales";
|
||||
|
||||
import { useAppConfig, useChatStore } from "../store";
|
||||
|
||||
@ -248,6 +249,38 @@ export function SideBar(props: { className?: string }) {
|
||||
chatStore.currentSession().mask.modelConfig?.providerName ||
|
||||
ServiceProvider.OpenAI;
|
||||
|
||||
const lange = getLang();
|
||||
const SideBarHeaderTextSubtitle: React.ReactNode = useMemo(() => {
|
||||
if (lange === "en") {
|
||||
return (
|
||||
<span>
|
||||
{" "}
|
||||
Choose Your Own Assistant
|
||||
<br /> <br />
|
||||
{/* eslint-disable-next-line react/no-unescaped-entities */}
|
||||
1. Sometimes it might act up a bit. Click <b>New Chat</b> below to try
|
||||
again. <br /> 2. For drawing: Generate images with the format "/mj
|
||||
prompt" (you can look up tools or methods for using MidJourney
|
||||
prompts). <br /> 3. If you find it helpful, consider buying the author
|
||||
a coffee.
|
||||
</span>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<span>
|
||||
选择一个你自己的助理
|
||||
<br />
|
||||
<br />
|
||||
1. 有时可能会<b>抽风</b>,点击下方<b>新的聊天</b>试一下吧
|
||||
<br />
|
||||
2. 绘图:“/mj 提示词”
|
||||
的格式生成图片(可以搜一下midjourney的提示词工具或使用方法)
|
||||
<br />
|
||||
3. 如果觉得还不错,可以给作者赏杯咖啡
|
||||
</span>
|
||||
);
|
||||
}, [lange]);
|
||||
|
||||
return (
|
||||
<SideBarContainer
|
||||
onDragStart={onDragStart}
|
||||
@ -255,26 +288,14 @@ export function SideBar(props: { className?: string }) {
|
||||
{...props}
|
||||
>
|
||||
<SideBarHeader
|
||||
title="这里开始……"
|
||||
subTitle={
|
||||
<span>
|
||||
选择一个你自己的助理
|
||||
<br />
|
||||
<br />
|
||||
1. 有时可能会<b>抽风</b>,点击下方<b>新的聊天</b>试一下吧
|
||||
<br />
|
||||
2. 绘图:“/mj 提示词”
|
||||
的格式生成图片(可以搜一下midjourney的提示词工具或使用方法)
|
||||
<br />
|
||||
3. 如果觉得还不错,可以给作者赏杯咖啡
|
||||
</span>
|
||||
}
|
||||
title={Locale.SideBarHeader.Title}
|
||||
subTitle={SideBarHeaderTextSubtitle}
|
||||
logo={<ChatGptIcon />}
|
||||
>
|
||||
<div className={styles["sidebar-header-bar"]}>
|
||||
<IconButton
|
||||
icon={<CoffeeIcon />}
|
||||
text={shouldNarrow ? undefined : "赏杯咖啡️"}
|
||||
text={shouldNarrow ? undefined : Locale.SideBarHeader.Coffee}
|
||||
className={styles["sidebar-bar-button"]}
|
||||
onClick={() => navigate(Path.Reward)}
|
||||
shadow
|
||||
|
@ -58,10 +58,15 @@ const cn = {
|
||||
ImageAgentOpenTip:
|
||||
"开启之后,返回的Midjourney图片将会通过本程序自身代理,所以本程序需要处于可以访问cdn.discordapp.com的网络环境中才有效",
|
||||
},
|
||||
SideBarHeader: {
|
||||
Title: "这里开始……",
|
||||
Coffee: "赏杯咖啡",
|
||||
},
|
||||
ChatItem: {
|
||||
ChatItemCount: (count: number) => `${count} 条对话`,
|
||||
},
|
||||
Chat: {
|
||||
UseTip: "当天使用:",
|
||||
SubTitle: (count: number) => `共 ${count} 条对话`,
|
||||
EditMessage: {
|
||||
Title: "编辑消息记录",
|
||||
|
@ -60,10 +60,15 @@ const en: LocaleType = {
|
||||
ImageAgentOpenTip:
|
||||
"After turning it on, the returned Midjourney image will be proxied by this program itself, so this program needs to be in a network environment that can access cdn.discordapp.com to be effective",
|
||||
},
|
||||
SideBarHeader: {
|
||||
Title: "Start Here...",
|
||||
Coffee: "Coffee please",
|
||||
},
|
||||
ChatItem: {
|
||||
ChatItemCount: (count: number) => `${count} messages`,
|
||||
},
|
||||
Chat: {
|
||||
UseTip: "day use:",
|
||||
SubTitle: (count: number) => `${count} messages`,
|
||||
EditMessage: {
|
||||
Title: "Edit All Messages",
|
||||
|
Loading…
Reference in New Issue
Block a user