Skip to content

Commit

Permalink
fix: removing send message component in bottom
Browse files Browse the repository at this point in the history
  • Loading branch information
proffapt committed Jun 30, 2024
1 parent 39a15fb commit e694297
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 48 deletions.
2 changes: 1 addition & 1 deletion web/src/components/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ const Layout = () => {
}}
/>
</Main>
<Messaging selected={selected} dialogOpenMode={sendDialogOpenMode} onDialogOpenModeChange={setSendDialogOpenMode} />
{/* <Messaging selected={selected} dialogOpenMode={sendDialogOpenMode} onDialogOpenModeChange={setSendDialogOpenMode} /> */}
</Box>
);
};
Expand Down
93 changes: 46 additions & 47 deletions web/src/components/Messaging.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,53 +87,52 @@ const MessageBar = (props) => {
};

return (
<></>
// <Paper
// elevation={3}
// sx={{
// display: "flex",
// position: "fixed",
// bottom: 0,
// right: 0,
// padding: 2,
// width: { xs: "100%", sm: `calc(100% - ${Navigation.width}px)` },
// backgroundColor: (theme) => (theme.palette.mode === "light" ? theme.palette.grey[100] : theme.palette.grey[900]),
// }}
// >
// <IconButton color="inherit" size="large" edge="start" onClick={props.onOpenDialogClick} aria-label={t("message_bar_show_dialog")}>
// <KeyboardArrowUpIcon />
// </IconButton>
// <TextField
// autoFocus
// margin="dense"
// placeholder={t("message_bar_type_message")}
// aria-label={t("message_bar_type_message")}
// role="textbox"
// type="text"
// fullWidth
// variant="standard"
// value={props.message}
// onChange={(ev) => props.onMessageChange(ev.target.value)}
// onKeyPress={(ev) => {
// if (ev.key === "Enter") {
// ev.preventDefault();
// handleSendClick();
// }
// }}
// onPaste={handlePaste}
// />
// <IconButton color="inherit" size="large" edge="end" onClick={handleSendClick} aria-label={t("message_bar_publish")}>
// <SendIcon />
// </IconButton>
// <Portal>
// <Snackbar
// open={snackOpen}
// autoHideDuration={3000}
// onClose={() => setSnackOpen(false)}
// message={t("message_bar_error_publishing")}
// />
// </Portal>
// </Paper>
<Paper
elevation={3}
sx={{
display: "flex",
position: "fixed",
bottom: 0,
right: 0,
padding: 2,
width: { xs: "100%", sm: `calc(100% - ${Navigation.width}px)` },
backgroundColor: (theme) => (theme.palette.mode === "light" ? theme.palette.grey[100] : theme.palette.grey[900]),
}}
>
<IconButton color="inherit" size="large" edge="start" onClick={props.onOpenDialogClick} aria-label={t("message_bar_show_dialog")}>
<KeyboardArrowUpIcon />
</IconButton>
<TextField
autoFocus
margin="dense"
placeholder={t("message_bar_type_message")}
aria-label={t("message_bar_type_message")}
role="textbox"
type="text"
fullWidth
variant="standard"
value={props.message}
onChange={(ev) => props.onMessageChange(ev.target.value)}
onKeyPress={(ev) => {
if (ev.key === "Enter") {
ev.preventDefault();
handleSendClick();
}
}}
onPaste={handlePaste}
/>
<IconButton color="inherit" size="large" edge="end" onClick={handleSendClick} aria-label={t("message_bar_publish")}>
<SendIcon />
</IconButton>
<Portal>
<Snackbar
open={snackOpen}
autoHideDuration={3000}
onClose={() => setSnackOpen(false)}
message={t("message_bar_error_publishing")}
/>
</Portal>
</Paper>
);
};

Expand Down

0 comments on commit e694297

Please sign in to comment.