|
@@ -3,7 +3,6 @@ import { styled } from '@mui/material/styles';
|
|
import { useState } from "react";
|
|
import { useState } from "react";
|
|
import Typography from '@mui/material/Typography';
|
|
import Typography from '@mui/material/Typography';
|
|
import ListItemText from '@mui/material/ListItemText';
|
|
import ListItemText from '@mui/material/ListItemText';
|
|
-import VideoFileIcon from '@mui/icons-material/VideoFile';
|
|
|
|
import Button from '@mui/material/Button';
|
|
import Button from '@mui/material/Button';
|
|
import ContentCopyIcon from '@mui/icons-material/ContentCopy';
|
|
import ContentCopyIcon from '@mui/icons-material/ContentCopy';
|
|
import DeleteOutlineIcon from '@mui/icons-material/DeleteOutline';
|
|
import DeleteOutlineIcon from '@mui/icons-material/DeleteOutline';
|
|
@@ -79,12 +78,6 @@ const useStyles = makeStyles({
|
|
padding: 5,
|
|
padding: 5,
|
|
borderRadius: 7,
|
|
borderRadius: 7,
|
|
},
|
|
},
|
|
- wrapperInner: {
|
|
|
|
- display: 'flex',
|
|
|
|
- alignItems: 'center',
|
|
|
|
- alignContent: 'center',
|
|
|
|
- width: '100%',
|
|
|
|
- },
|
|
|
|
informationWrapper: {
|
|
informationWrapper: {
|
|
display: 'flex',
|
|
display: 'flex',
|
|
alignItems: 'center',
|
|
alignItems: 'center',
|
|
@@ -111,9 +104,11 @@ const useStyles = makeStyles({
|
|
},
|
|
},
|
|
player: {
|
|
player: {
|
|
backgroundColor: '#ffffff',
|
|
backgroundColor: '#ffffff',
|
|
|
|
+ width: '100%',
|
|
},
|
|
},
|
|
playerActive: {
|
|
playerActive: {
|
|
backgroundColor: '#babdbc',
|
|
backgroundColor: '#babdbc',
|
|
|
|
+ width: '100%',
|
|
},
|
|
},
|
|
modalDelete: {
|
|
modalDelete: {
|
|
background: '#ffffff',
|
|
background: '#ffffff',
|
|
@@ -186,14 +181,6 @@ const useStyles = makeStyles({
|
|
top: -10,
|
|
top: -10,
|
|
pointerEvents: 'auto'
|
|
pointerEvents: 'auto'
|
|
},
|
|
},
|
|
- folderIcon: {
|
|
|
|
- marginRight: 7,
|
|
|
|
- color: '#54b0fc',
|
|
|
|
- cursor: 'pointer',
|
|
|
|
- '&:hover': {
|
|
|
|
- color: '#016cc3'
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
avatarIcon: {
|
|
avatarIcon: {
|
|
position: 'absolute',
|
|
position: 'absolute',
|
|
left: -54,
|
|
left: -54,
|
|
@@ -255,7 +242,7 @@ const MessageLeftVideo = ({ url,tongue,watched,edited,avatarUrl,color,name,lastN
|
|
const open = Boolean(anchorEl);
|
|
const open = Boolean(anchorEl);
|
|
const checked = isSelected(_id)
|
|
const checked = isSelected(_id)
|
|
const handleClose = (type: string | undefined): void => {
|
|
const handleClose = (type: string | undefined): void => {
|
|
- if (type === 'copy') copied('Link')
|
|
|
|
|
|
+ if (type === 'copy') copied('Text')
|
|
if (type === 'delete') setModal(true)
|
|
if (type === 'delete') setModal(true)
|
|
setAnchorEl(null)
|
|
setAnchorEl(null)
|
|
setSelected(false)
|
|
setSelected(false)
|
|
@@ -285,15 +272,11 @@ const MessageLeftVideo = ({ url,tongue,watched,edited,avatarUrl,color,name,lastN
|
|
<div className={classes.container} style={{marginBottom:tongue?12:0}}>
|
|
<div className={classes.container} style={{marginBottom:tongue?12:0}}>
|
|
<div onContextMenu={(e) => handleContextMenu(e)} className={classes.wrapper}
|
|
<div onContextMenu={(e) => handleContextMenu(e)} className={classes.wrapper}
|
|
style={{backgroundColor:selected?'#babdbc':'#ffffff',pointerEvents:isSomeSelected?'none':'auto'}}>
|
|
style={{backgroundColor:selected?'#babdbc':'#ffffff',pointerEvents:isSomeSelected?'none':'auto'}}>
|
|
- <Typography style={{color: "#00b333"}} variant="h6" align="right">
|
|
|
|
|
|
+ <Typography style={{color: "#00b333",marginBottom:10}} variant="h6" align="right">
|
|
{`${firstLetter(name)}${slicedWord(name, 15, 1)}
|
|
{`${firstLetter(name)}${slicedWord(name, 15, 1)}
|
|
${firstLetter(lastName)}${slicedWord(lastName, 15, 1)}`}
|
|
${firstLetter(lastName)}${slicedWord(lastName, 15, 1)}`}
|
|
</Typography>
|
|
</Typography>
|
|
- <div className={classes.wrapperInner}>
|
|
|
|
- <VideoFileIcon onClick={() => handleDownload(url, fullType)}
|
|
|
|
- className={classes.folderIcon} fontSize='large' />
|
|
|
|
- <Player className={selected?classes.playerActive:classes.player} playsInline src={url}/>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <Player className={selected?classes.playerActive:classes.player} playsInline src={url}/>
|
|
<ListItemText style={{wordBreak:'break-word'}} secondary={caption} secondaryTypographyProps={{color: "#000000"}}/>
|
|
<ListItemText style={{wordBreak:'break-word'}} secondary={caption} secondaryTypographyProps={{color: "#000000"}}/>
|
|
<div className={classes.informationWrapper}>
|
|
<div className={classes.informationWrapper}>
|
|
<div className={classes.time} style={{ color: '#959595'}}>{`${edited?'edited ':''}${timeStampMessage(createdAt)}`}</div>
|
|
<div className={classes.time} style={{ color: '#959595'}}>{`${edited?'edited ':''}${timeStampMessage(createdAt)}`}</div>
|
|
@@ -336,12 +319,12 @@ const MessageLeftVideo = ({ url,tongue,watched,edited,avatarUrl,color,name,lastN
|
|
<DownloadIcon/>
|
|
<DownloadIcon/>
|
|
Download
|
|
Download
|
|
</MenuItem>
|
|
</MenuItem>
|
|
- <CopyToClipboard onCopy={() => handleClose('copy')} text={url}>
|
|
|
|
|
|
+ {caption&&<CopyToClipboard onCopy={() => handleClose('copy')} text={caption}>
|
|
<MenuItem>
|
|
<MenuItem>
|
|
<ContentCopyIcon />
|
|
<ContentCopyIcon />
|
|
- Copy Link
|
|
|
|
|
|
+ Copy Text
|
|
</MenuItem>
|
|
</MenuItem>
|
|
- </CopyToClipboard>
|
|
|
|
|
|
+ </CopyToClipboard>}
|
|
<MenuItem onClick={() => {
|
|
<MenuItem onClick={() => {
|
|
pinMessageById(_id, !pinned)
|
|
pinMessageById(_id, !pinned)
|
|
handleClose(undefined)
|
|
handleClose(undefined)
|