mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-09 19:46:37 +08:00
Adjust text for mobile screens in Home component
This commit is contained in:
parent
f7c55117ac
commit
d5ef07b4d1
@ -535,10 +535,11 @@ export function Chat(props: {}) {
|
|||||||
const [showPromptModal, setShowPromptModal] = useState(false);
|
const [showPromptModal, setShowPromptModal] = useState(false);
|
||||||
|
|
||||||
// Auto focus
|
// Auto focus
|
||||||
useEffect(() => {
|
//useEffect(() => {
|
||||||
if (sidebarCollapse && isMobileScreen()) return;
|
// if (isMobileScreen() && !sidebarCollapse) return;
|
||||||
inputRef.current?.focus();
|
// inputRef.current?.focus();
|
||||||
}, [sidebarCollapse]);
|
//}, [sidebarCollapse]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.chat} key={session.id}>
|
<div className={styles.chat} key={session.id}>
|
||||||
<div className={styles["window-header"]}>
|
<div className={styles["window-header"]}>
|
||||||
|
@ -309,7 +309,13 @@ function _Home() {
|
|||||||
>
|
>
|
||||||
<IconButton
|
<IconButton
|
||||||
icon={<AddIcon />}
|
icon={<AddIcon />}
|
||||||
text={sidebarCollapse ? undefined : Locale.Home.NewChat}
|
text={
|
||||||
|
isMobileScreen()
|
||||||
|
? undefined
|
||||||
|
: sidebarCollapse
|
||||||
|
? undefined
|
||||||
|
: Locale.Home.NewChat
|
||||||
|
}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
createNewSession();
|
createNewSession();
|
||||||
setSideBarCollapse(true);
|
setSideBarCollapse(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user