Size fix for mobile
This commit is contained in:
parent
e512cdf71f
commit
f5ce84a310
@ -48,6 +48,7 @@ div {
|
|||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-message {
|
.user-message {
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import React, { useState, useEffect, useRef, useCallback } from 'react';
|
import React, { useState, useEffect, useRef, useCallback } from 'react';
|
||||||
import FormGroup from '@mui/material/FormGroup';
|
import FormGroup from '@mui/material/FormGroup';
|
||||||
import FormControlLabel from '@mui/material/FormControlLabel';
|
import FormControlLabel from '@mui/material/FormControlLabel';
|
||||||
|
import { useTheme } from '@mui/material';
|
||||||
import Switch from '@mui/material/Switch';
|
import Switch from '@mui/material/Switch';
|
||||||
import Divider from '@mui/material/Divider';
|
import Divider from '@mui/material/Divider';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
import Tooltip from '@mui/material/Tooltip';
|
||||||
@ -646,10 +647,10 @@ const App = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box sx={{ display: 'flex', height: 1 }}>
|
<Box sx={{ display: 'flex', flexDirection: 'column', height: '100dvh' }}>
|
||||||
<CssBaseline />
|
<CssBaseline />
|
||||||
<AppBar
|
<AppBar
|
||||||
position="fixed"
|
position="static"
|
||||||
sx={{
|
sx={{
|
||||||
zIndex: (theme) => theme.zIndex.drawer + 1,
|
zIndex: (theme) => theme.zIndex.drawer + 1,
|
||||||
}}
|
}}
|
||||||
@ -683,6 +684,8 @@ const App = () => {
|
|||||||
</Typography>
|
</Typography>
|
||||||
</Toolbar>
|
</Toolbar>
|
||||||
</AppBar>
|
</AppBar>
|
||||||
|
|
||||||
|
<Box sx={{ display: "flex", flexGrow: 1, flexDirection: "column" }}>
|
||||||
<Box
|
<Box
|
||||||
component="nav"
|
component="nav"
|
||||||
aria-label="mailbox folders"
|
aria-label="mailbox folders"
|
||||||
@ -708,15 +711,16 @@ const App = () => {
|
|||||||
{drawer}
|
{drawer}
|
||||||
</Drawer>
|
</Drawer>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Box
|
<Box
|
||||||
component="main"
|
component="main"
|
||||||
sx={{ flexGrow: 1, p: 1, height: '100vh' }}
|
sx={{
|
||||||
|
flexGrow: 1,
|
||||||
|
overflow: 'auto'
|
||||||
|
}}
|
||||||
className="ChatBox">
|
className="ChatBox">
|
||||||
<Toolbar />
|
|
||||||
|
|
||||||
<Box className="Conversation"
|
<Box className="Conversation"
|
||||||
sx={{ flexGrow: 1, p: 1 }}
|
sx={{ flexGrow: 2, p: 1 }}
|
||||||
ref={conversationRef}>
|
ref={conversationRef}>
|
||||||
{conversation.map((message, index) => {
|
{conversation.map((message, index) => {
|
||||||
const formattedContent = message.content.trim();
|
const formattedContent = message.content.trim();
|
||||||
@ -763,6 +767,7 @@ const App = () => {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</Box>
|
</Box>
|
||||||
|
</Box>
|
||||||
|
|
||||||
<Box className="Query" sx={{ display: "flex", flexDirection: "row", p: 1 }}>
|
<Box className="Query" sx={{ display: "flex", flexDirection: "row", p: 1 }}>
|
||||||
<TextField
|
<TextField
|
||||||
@ -784,6 +789,8 @@ const App = () => {
|
|||||||
</AccordionActions>
|
</AccordionActions>
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
|
|
||||||
<Snackbar open={snackOpen} autoHideDuration={(snackSeverity === "success" || snackSeverity === "info") ? 1500 : 6000} onClose={handleSnackClose}>
|
<Snackbar open={snackOpen} autoHideDuration={(snackSeverity === "success" || snackSeverity === "info") ? 1500 : 6000} onClose={handleSnackClose}>
|
||||||
<Alert
|
<Alert
|
||||||
onClose={handleSnackClose}
|
onClose={handleSnackClose}
|
||||||
|
@ -6,8 +6,7 @@ body {
|
|||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
height: 100%;
|
height: 100dvh;
|
||||||
width: 100%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
code {
|
code {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user