|
@@ -60,8 +60,13 @@ const StyledMenu = styled((props:any) => (
|
|
const useStyles = makeStyles({
|
|
const useStyles = makeStyles({
|
|
container: {
|
|
container: {
|
|
display: "flex",
|
|
display: "flex",
|
|
- justifyContent: "flex-end",
|
|
|
|
|
|
+ alignItems: 'flex-end',
|
|
|
|
+ alignContent: 'flex-end',
|
|
|
|
+ flexDirection:'column',
|
|
borderRadius: 7,
|
|
borderRadius: 7,
|
|
|
|
+ position: 'relative',
|
|
|
|
+ marginBottom: 5,
|
|
|
|
+ padding:'10px 22px 10px 0px'
|
|
},
|
|
},
|
|
wrapper: {
|
|
wrapper: {
|
|
position: 'relative',
|
|
position: 'relative',
|
|
@@ -142,14 +147,13 @@ const useStyles = makeStyles({
|
|
borderRadius: 5,
|
|
borderRadius: 5,
|
|
},
|
|
},
|
|
captionWrapper: {
|
|
captionWrapper: {
|
|
- position: "absolute",
|
|
|
|
|
|
+ position: 'relative',
|
|
fontSize: ".85em",
|
|
fontSize: ".85em",
|
|
color: '#626262',
|
|
color: '#626262',
|
|
- maxWidth:'76%',
|
|
|
|
|
|
+ maxWidth: 474,
|
|
fontWeight:600,
|
|
fontWeight:600,
|
|
- bottom: -30,
|
|
|
|
- right: 40,
|
|
|
|
borderRadius: 5,
|
|
borderRadius: 5,
|
|
|
|
+ marginRight:10,
|
|
wordBreak:'break-word',
|
|
wordBreak:'break-word',
|
|
textAlign: "left",
|
|
textAlign: "left",
|
|
font: "400 .9em 'Open Sans', sans-serif",
|
|
font: "400 .9em 'Open Sans', sans-serif",
|
|
@@ -163,7 +167,7 @@ const useStyles = makeStyles({
|
|
borderBottom: "15px solid #ffffff",
|
|
borderBottom: "15px solid #ffffff",
|
|
borderLeft: "15px solid transparent",
|
|
borderLeft: "15px solid transparent",
|
|
borderRight: "15px solid transparent",
|
|
borderRight: "15px solid transparent",
|
|
- bottom: "0",
|
|
|
|
|
|
+ bottom: "0px",
|
|
right: "-15px"
|
|
right: "-15px"
|
|
},
|
|
},
|
|
"&:before": {
|
|
"&:before": {
|
|
@@ -205,14 +209,14 @@ const useStyles = makeStyles({
|
|
position: "absolute",
|
|
position: "absolute",
|
|
fontSize: "1.7em",
|
|
fontSize: "1.7em",
|
|
fontWeight:600,
|
|
fontWeight:600,
|
|
- bottom: 0,
|
|
|
|
|
|
+ bottom: '0.2rem',
|
|
left: -40,
|
|
left: -40,
|
|
},
|
|
},
|
|
emojiCompanionTitle: {
|
|
emojiCompanionTitle: {
|
|
position: "absolute",
|
|
position: "absolute",
|
|
fontSize: "1.7em",
|
|
fontSize: "1.7em",
|
|
fontWeight:600,
|
|
fontWeight:600,
|
|
- bottom: '2rem',
|
|
|
|
|
|
+ bottom: '2.2rem',
|
|
left: -40,
|
|
left: -40,
|
|
},
|
|
},
|
|
emoji: {
|
|
emoji: {
|
|
@@ -263,11 +267,17 @@ const useStyles = makeStyles({
|
|
alignContent: 'center',
|
|
alignContent: 'center',
|
|
alignItems: 'center',
|
|
alignItems: 'center',
|
|
},
|
|
},
|
|
|
|
+ checkboxSelect: {
|
|
|
|
+ position: 'absolute',
|
|
|
|
+ right: -80,
|
|
|
|
+ top: '50%',
|
|
|
|
+ pointerEvents: 'auto'
|
|
|
|
+ }
|
|
});
|
|
});
|
|
|
|
|
|
const label = { inputProps: { 'aria-label': 'Checkbox demo' } };
|
|
const label = { inputProps: { 'aria-label': 'Checkbox demo' } };
|
|
|
|
|
|
-interface IMessageReplyRight {
|
|
|
|
|
|
+interface IMessageRightReply {
|
|
url:string,
|
|
url:string,
|
|
replyMessage: string,
|
|
replyMessage: string,
|
|
message:string,
|
|
message:string,
|
|
@@ -289,7 +299,7 @@ interface IMessageReplyRight {
|
|
oldId: string
|
|
oldId: string
|
|
}
|
|
}
|
|
|
|
|
|
-const MessageReplyRight = ({url,replyMessage,message,replyName,replyLastName,createdAt,caption,emoji,emojiCompanion,pinned,isSomeSelected,isSelected,handleSelected,_id,nightMode,handleReply,fullType,handleScrollToTheMessage,oldId}:IMessageReplyRight) => {
|
|
|
|
|
|
+const MessageRightReply = ({url,replyMessage,message,replyName,replyLastName,createdAt,caption,emoji,emojiCompanion,pinned,isSomeSelected,isSelected,handleSelected,_id,nightMode,handleReply,fullType,handleScrollToTheMessage,oldId}:IMessageRightReply) => {
|
|
const classes = useStyles();
|
|
const classes = useStyles();
|
|
const [anchorEl, setAnchorEl] = useState<any>(null);
|
|
const [anchorEl, setAnchorEl] = useState<any>(null);
|
|
const [selected, setSelected] = useState<boolean>(false);
|
|
const [selected, setSelected] = useState<boolean>(false);
|
|
@@ -329,7 +339,7 @@ const MessageReplyRight = ({url,replyMessage,message,replyName,replyLastName,cre
|
|
}
|
|
}
|
|
|
|
|
|
return (
|
|
return (
|
|
- <div className={classes.container} style={{ marginBottom: caption ? 45 : 15}}>
|
|
|
|
|
|
+ <div className={classes.container}>
|
|
<div onContextMenu={(e) => handleContextMenu(e)} className={classes.wrapper}
|
|
<div onContextMenu={(e) => handleContextMenu(e)} className={classes.wrapper}
|
|
style={{backgroundColor:selected?'#ced8d7':undefined,
|
|
style={{backgroundColor:selected?'#ced8d7':undefined,
|
|
border:selected?'#ced8d7':undefined,pointerEvents:isSomeSelected?'none':'auto'}}>
|
|
border:selected?'#ced8d7':undefined,pointerEvents:isSomeSelected?'none':'auto'}}>
|
|
@@ -356,12 +366,13 @@ const MessageReplyRight = ({url,replyMessage,message,replyName,replyLastName,cre
|
|
</MenuItem>
|
|
</MenuItem>
|
|
</ul>
|
|
</ul>
|
|
<ListItemText className={selected?classes.messageActive:classes.message}
|
|
<ListItemText className={selected?classes.messageActive:classes.message}
|
|
- primary={slicedWord(message, 40, 0)}
|
|
|
|
- primaryTypographyProps={{color: "#0e0d0d"}}/>
|
|
|
|
|
|
+ primary={message}
|
|
|
|
+ primaryTypographyProps={{color: "#2f2f2f"}}/>
|
|
<div className={classes.time}>{timeStampMessage(createdAt)}</div>
|
|
<div className={classes.time}>{timeStampMessage(createdAt)}</div>
|
|
{emojiCompanion && <div className={classes.emojiCompanionTitle}>{emojisArr[Number(emojiCompanion)]}</div>}
|
|
{emojiCompanion && <div className={classes.emojiCompanionTitle}>{emojisArr[Number(emojiCompanion)]}</div>}
|
|
{emoji && <div className={classes.emojiTitle}>{emojisArr[Number(emoji)]}</div>}
|
|
{emoji && <div className={classes.emojiTitle}>{emojisArr[Number(emoji)]}</div>}
|
|
- {caption&&<div className={classes.captionWrapper}>{slicedWord(caption, 20, 0)}</div>}
|
|
|
|
|
|
+ {isSomeSelected && <div className={classes.checkboxSelect}><Checkbox {...label} checked={checked} sx={{ color: nightMode ? '#ffffff' : '#00ff48', '&.Mui-checked': { color: nightMode ? '#ffffff' : '#00ff48' } }}
|
|
|
|
+ onClick={() => handleSelected(_id)}/></div>}
|
|
<StyledMenu id="demo-positioned-menu" aria-labelledby="demo-positioned-button"
|
|
<StyledMenu id="demo-positioned-menu" aria-labelledby="demo-positioned-button"
|
|
anchorEl={anchorEl} open={open} onClose={handleClose}>
|
|
anchorEl={anchorEl} open={open} onClose={handleClose}>
|
|
<MenuItem onClick={handleEmojiMenu} style={{ cursor: 'none' }} >
|
|
<MenuItem onClick={handleEmojiMenu} style={{ cursor: 'none' }} >
|
|
@@ -421,8 +432,8 @@ const MessageReplyRight = ({url,replyMessage,message,replyName,replyLastName,cre
|
|
</div>
|
|
</div>
|
|
</div>}
|
|
</div>}
|
|
</div>
|
|
</div>
|
|
- {isSomeSelected&&<Checkbox {...label} checked={checked} sx={{color:nightMode?'#ffffff':'#00ff48','&.Mui-checked': {color: nightMode?'#ffffff':'#00ff48'}}} onClick={() => handleSelected(_id)}/>}
|
|
|
|
|
|
+ {caption&&<div className={classes.captionWrapper}>{caption}</div>}
|
|
</div>
|
|
</div>
|
|
)};
|
|
)};
|
|
|
|
|
|
-export default MessageReplyRight
|
|
|
|
|
|
+export default MessageRightReply
|