move send btn to the side, changed add group label

This commit is contained in:
PhilReact 2024-12-03 14:01:07 +02:00
parent 02b147a094
commit a0a64f1423
4 changed files with 24 additions and 56 deletions

View File

@ -580,7 +580,7 @@ useEffect(() => {
backgroundColor: "#232428", backgroundColor: "#232428",
minHeight: isMobile ? '0px' : '150px', minHeight: isMobile ? '0px' : '150px',
display: 'flex', display: 'flex',
flexDirection: 'column', flexDirection: 'row',
overflow: 'hidden', overflow: 'hidden',
width: '100%', width: '100%',
boxSizing: 'border-box', boxSizing: 'border-box',
@ -596,14 +596,17 @@ useEffect(() => {
flexDirection: 'column', flexDirection: 'column',
flexGrow: isMobile && 1, flexGrow: isMobile && 1,
overflow: !isMobile && "auto", overflow: !isMobile && "auto",
flexShrink: 0 flexShrink: 0,
width: 'calc(100% - 100px)',
justifyContent: 'flex-end'
}}> }}>
{replyMessage && ( {replyMessage && (
<Box sx={{ <Box sx={{
display: 'flex', display: 'flex',
gap: '5px', gap: '5px',
alignItems: 'flex-start', alignItems: 'flex-start',
width: '100%' width: 'calc(100% - 100px)',
justifyContent: 'flex-end'
}}> }}>
<ReplyPreview message={replyMessage} /> <ReplyPreview message={replyMessage} />
@ -660,34 +663,14 @@ useEffect(() => {
)} )}
<Box sx={{ <Box sx={{
display: 'flex', display: 'flex',
width: '100&', width: '100px',
gap: '10px', gap: '10px',
justifyContent: 'center', justifyContent: 'center',
flexShrink: 0, flexShrink: 0,
position: 'relative', position: 'relative',
}}> }}>
{isFocusedParent && (
<CustomButton
onClick={()=> {
if(isSending) return
setIsFocusedParent(false)
clearEditorContent()
// Unfocus the editor
}}
style={{
marginTop: 'auto',
alignSelf: 'center',
cursor: isSending ? 'default' : 'pointer',
background: 'red',
flexShrink: 0,
padding: isMobile && '5px'
}}
>
{` Close`}
</CustomButton>
)}
<CustomButton <CustomButton
onClick={()=> { onClick={()=> {
if(messageSize > 4000) return if(messageSize > 4000) return
@ -701,7 +684,9 @@ useEffect(() => {
cursor: isSending ? 'default' : 'pointer', cursor: isSending ? 'default' : 'pointer',
background: isSending && 'rgba(0, 0, 0, 0.8)', background: isSending && 'rgba(0, 0, 0, 0.8)',
flexShrink: 0, flexShrink: 0,
padding: isMobile && '5px' padding: '5px',
width: '100px',
minWidth: 'auto'
}} }}
> >
{isSending && ( {isSending && (

View File

@ -755,7 +755,7 @@ const clearEditorContent = () => {
backgroundColor: "#232428", backgroundColor: "#232428",
minHeight: isMobile ? '0px' : '150px', minHeight: isMobile ? '0px' : '150px',
display: 'flex', display: 'flex',
flexDirection: 'column', flexDirection: 'row',
overflow: 'hidden', overflow: 'hidden',
width: '100%', width: '100%',
boxSizing: 'border-box', boxSizing: 'border-box',
@ -766,12 +766,15 @@ const clearEditorContent = () => {
zIndex: isFocusedParent ? 5 : 'unset', zIndex: isFocusedParent ? 5 : 'unset',
flexShrink: 0 flexShrink: 0
}}> }}>
<div style={{ <div style={{
display: 'flex', display: 'flex',
flexDirection: 'column', flexDirection: 'column',
flexGrow: isMobile && 1, flexGrow: isMobile && 1,
overflow: !isMobile && "auto", overflow: !isMobile && "auto",
flexShrink: 0 flexShrink: 0,
width: 'calc(100% - 100px)',
justifyContent: 'flex-end'
}}> }}>
{replyMessage && ( {replyMessage && (
<Box sx={{ <Box sx={{
@ -837,34 +840,13 @@ const clearEditorContent = () => {
)} )}
<Box sx={{ <Box sx={{
display: 'flex', display: 'flex',
width: '100%', width: '100px',
gap: '10px', gap: '10px',
justifyContent: 'center', justifyContent: 'center',
flexShrink: 0, flexShrink: 0,
position: 'relative', position: 'relative',
}}> }}>
{isFocusedParent && (
<CustomButton
onClick={()=> {
if(isSending) return
setIsFocusedParent(false)
clearEditorContent()
// Unfocus the editor
}}
style={{
marginTop: 'auto',
alignSelf: 'center',
cursor: isSending ? 'default' : 'pointer',
background: 'red',
flexShrink: 0,
padding: isMobile && '5px'
}}
>
{` Close`}
</CustomButton>
)}
<CustomButton <CustomButton
onClick={()=> { onClick={()=> {
if(messageSize > 4000) return if(messageSize > 4000) return
@ -877,7 +859,9 @@ const clearEditorContent = () => {
cursor: isSending ? 'default' : 'pointer', cursor: isSending ? 'default' : 'pointer',
background: isSending && 'rgba(0, 0, 0, 0.8)', background: isSending && 'rgba(0, 0, 0, 0.8)',
flexShrink: 0, flexShrink: 0,
padding: isMobile && '5px', padding: '5px',
width: '100px',
minWidth: 'auto'
}} }}
> >
@ -898,7 +882,6 @@ const clearEditorContent = () => {
</CustomButton> </CustomButton>
</Box> </Box>
{/* <button onClick={sendMessage}>send</button> */}
</div> </div>
)} )}
{isOpenQManager !== null && ( {isOpenQManager !== null && (

View File

@ -194,7 +194,7 @@ export const AddGroup = ({ address, open, setOpen }) => {
<AppBar sx={{ position: "relative", bgcolor: "#232428" }}> <AppBar sx={{ position: "relative", bgcolor: "#232428" }}>
<Toolbar> <Toolbar>
<Typography sx={{ ml: 2, flex: 1 }} variant="h6" component="div"> <Typography sx={{ ml: 2, flex: 1 }} variant="h6" component="div">
Add Group Group Mgmt
</Typography> </Typography>
<IconButton <IconButton

View File

@ -2145,7 +2145,7 @@ export const Group = ({
color: "white", color: "white",
}} }}
/> />
Add Group Group Mgmt
</CustomButton> </CustomButton>
)} )}
{chatMode === "directs" && ( {chatMode === "directs" && (