feat: simplify and improve UI layout
This commit is contained in:
parent
56230b8361
commit
38378f0dfb
@ -46,6 +46,7 @@ export const ChatTranscript = ({
|
|||||||
sx={theme => ({
|
sx={theme => ({
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
flexDirection: 'column',
|
flexDirection: 'column',
|
||||||
|
paddingY: theme.spacing(1),
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
{messageLog.map(message => {
|
{messageLog.map(message => {
|
||||||
|
@ -5,6 +5,7 @@ import FormControl from '@mui/material/FormControl'
|
|||||||
import Stack from '@mui/material/Stack'
|
import Stack from '@mui/material/Stack'
|
||||||
import TextField from '@mui/material/TextField'
|
import TextField from '@mui/material/TextField'
|
||||||
import Fab from '@mui/material/Fab'
|
import Fab from '@mui/material/Fab'
|
||||||
|
import Divider from '@mui/material/Divider'
|
||||||
import ArrowUpward from '@mui/icons-material/ArrowUpward'
|
import ArrowUpward from '@mui/icons-material/ArrowUpward'
|
||||||
|
|
||||||
import { ShellContext } from 'ShellContext'
|
import { ShellContext } from 'ShellContext'
|
||||||
@ -164,9 +165,10 @@ export function Room({
|
|||||||
<ChatTranscript
|
<ChatTranscript
|
||||||
messageLog={messageLog}
|
messageLog={messageLog}
|
||||||
userId={userId}
|
userId={userId}
|
||||||
className="grow overflow-auto"
|
className="grow overflow-auto px-4"
|
||||||
/>
|
/>
|
||||||
<form onSubmit={handleMessageSubmit} className="mt-2">
|
<Divider />
|
||||||
|
<form onSubmit={handleMessageSubmit} className="p-4">
|
||||||
<Stack direction="row" spacing={2}>
|
<Stack direction="row" spacing={2}>
|
||||||
<FormControl fullWidth>
|
<FormControl fullWidth>
|
||||||
<TextField
|
<TextField
|
||||||
|
@ -53,9 +53,6 @@ const Alert = forwardRef<HTMLDivElement, AlertProps>(function Alert(
|
|||||||
const Main = styled('main', { shouldForwardProp: prop => prop !== 'open' })<{
|
const Main = styled('main', { shouldForwardProp: prop => prop !== 'open' })<{
|
||||||
open?: boolean
|
open?: boolean
|
||||||
}>(({ theme, open }) => ({
|
}>(({ theme, open }) => ({
|
||||||
flexGrow: 1,
|
|
||||||
padding: theme.spacing(3),
|
|
||||||
paddingTop: 0,
|
|
||||||
transition: theme.transitions.create('margin', {
|
transition: theme.transitions.create('margin', {
|
||||||
easing: theme.transitions.easing.sharp,
|
easing: theme.transitions.easing.sharp,
|
||||||
duration: theme.transitions.duration.leavingScreen,
|
duration: theme.transitions.duration.leavingScreen,
|
||||||
@ -296,14 +293,10 @@ export const Shell = ({ children, userPeerId }: ShellProps) => {
|
|||||||
sx={{
|
sx={{
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
flexDirection: 'column',
|
flexDirection: 'column',
|
||||||
flexGrow: 'unset',
|
|
||||||
height: '100%',
|
|
||||||
width: '100%',
|
width: '100%',
|
||||||
maxHeight: '100%',
|
|
||||||
overflow: 'auto',
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<DrawerHeader sx={{ flexGrow: 1 }}></DrawerHeader>
|
<DrawerHeader />
|
||||||
<Box sx={{ overflow: 'auto', flexGrow: 1 }}>{children}</Box>
|
<Box sx={{ overflow: 'auto', flexGrow: 1 }}>{children}</Box>
|
||||||
</Main>
|
</Main>
|
||||||
</Box>
|
</Box>
|
||||||
|
@ -29,7 +29,7 @@ export function Home() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box className="Home">
|
<Box className="Home px-4">
|
||||||
<header className="max-w-3xl text-center mx-auto mt-8">
|
<header className="max-w-3xl text-center mx-auto mt-8">
|
||||||
<Typography variant="body1">
|
<Typography variant="body1">
|
||||||
This is a communication tool that is free, open source, and designed
|
This is a communication tool that is free, open source, and designed
|
||||||
|
Loading…
Reference in New Issue
Block a user