隐藏配置

This commit is contained in:
xuzhenjun 2023-04-11 00:57:50 +08:00
parent e1eb70cf71
commit 8ec37bc7f1
2 changed files with 14 additions and 20 deletions

View File

@ -34,9 +34,9 @@ export function Loading(props: { noLogo?: boolean }) {
); );
} }
const Settings = dynamic(async () => (await import("./settings")).Settings, { // const Settings = dynamic(async () => (await import("./settings")).Settings, {
loading: () => <Loading noLogo />, // loading: () => <Loading noLogo />,
}); // });
const ChatList = dynamic(async () => (await import("./chat-list")).ChatList, { const ChatList = dynamic(async () => (await import("./chat-list")).ChatList, {
loading: () => <Loading noLogo />, loading: () => <Loading noLogo />,
@ -146,7 +146,7 @@ function _Home() {
onClick={chatStore.deleteSession} onClick={chatStore.deleteSession}
/> />
</div> </div>
<div className={styles["sidebar-action"]}> {/* <div className={styles["sidebar-action"]}>
<IconButton <IconButton
icon={<SettingsIcon />} icon={<SettingsIcon />}
onClick={() => { onClick={() => {
@ -155,7 +155,7 @@ function _Home() {
}} }}
shadow shadow
/> />
</div> </div> */}
<div className={styles["sidebar-action"]}> <div className={styles["sidebar-action"]}>
<a href={REPO_URL} target="_blank"> <a href={REPO_URL} target="_blank">
<IconButton icon={<GithubIcon />} shadow /> <IconButton icon={<GithubIcon />} shadow />
@ -177,20 +177,11 @@ function _Home() {
</div> </div>
<div className={styles["window-content"]}> <div className={styles["window-content"]}>
{openSettings ? ( <Chat
<Settings key="chat"
closeSettings={() => { showSideBar={() => setShowSideBar(true)}
setOpenSettings(false); sideBarShowing={showSideBar}
setShowSideBar(true); />
}}
/>
) : (
<Chat
key="chat"
showSideBar={() => setShowSideBar(true)}
sideBarShowing={showSideBar}
/>
)}
</div> </div>
</div> </div>
); );

View File

@ -1,5 +1,5 @@
import { SubmitKey } from "../store/app"; import { SubmitKey } from "../store/app";
import { isMobileScreen } from "../utils";
const cn = { const cn = {
WIP: "该功能仍在开发中……", WIP: "该功能仍在开发中……",
Error: { Error: {
@ -25,6 +25,9 @@ const cn = {
if (submitKey === String(SubmitKey.Enter)) { if (submitKey === String(SubmitKey.Enter)) {
inputHints += "Shift + Enter 换行"; inputHints += "Shift + Enter 换行";
} }
if (isMobileScreen()) {
return "与ta对话吧";
}
return inputHints + "/ 触发补全提示词咒语"; return inputHints + "/ 触发补全提示词咒语";
}, },
Send: "发送", Send: "发送",