mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-09 11:36:38 +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);
|
||||
|
||||
// Auto focus
|
||||
useEffect(() => {
|
||||
if (sidebarCollapse && isMobileScreen()) return;
|
||||
inputRef.current?.focus();
|
||||
}, [sidebarCollapse]);
|
||||
//useEffect(() => {
|
||||
// if (isMobileScreen() && !sidebarCollapse) return;
|
||||
// inputRef.current?.focus();
|
||||
//}, [sidebarCollapse]);
|
||||
|
||||
return (
|
||||
<div className={styles.chat} key={session.id}>
|
||||
<div className={styles["window-header"]}>
|
||||
|
@ -309,7 +309,13 @@ function _Home() {
|
||||
>
|
||||
<IconButton
|
||||
icon={<AddIcon />}
|
||||
text={sidebarCollapse ? undefined : Locale.Home.NewChat}
|
||||
text={
|
||||
isMobileScreen()
|
||||
? undefined
|
||||
: sidebarCollapse
|
||||
? undefined
|
||||
: Locale.Home.NewChat
|
||||
}
|
||||
onClick={() => {
|
||||
createNewSession();
|
||||
setSideBarCollapse(true);
|
||||
|
Loading…
Reference in New Issue
Block a user