1.0.3-1.4.9 #3
@@ -55,7 +55,7 @@ export function MessageImage(props: AttachmentProps) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
console.info(downloadStatus);
|
||||||
return (
|
return (
|
||||||
<AspectRatio onClick={onClick} ref={mainRef} style={{
|
<AspectRatio onClick={onClick} ref={mainRef} style={{
|
||||||
minWidth: 200,
|
minWidth: 200,
|
||||||
@@ -76,7 +76,7 @@ export function MessageImage(props: AttachmentProps) {
|
|||||||
border: '1px solid ' + colors.borderColor,
|
border: '1px solid ' + colors.borderColor,
|
||||||
display: loadedImage ? 'block' : 'none'
|
display: loadedImage ? 'block' : 'none'
|
||||||
}} src={blob} onLoad={() => setLoadedImage(true)}></img>)}
|
}} src={blob} onLoad={() => setLoadedImage(true)}></img>)}
|
||||||
{((downloadStatus != DownloadStatus.DOWNLOADED && downloadStatus != DownloadStatus.PENDING) || !loadedImage) && preview.length >= 20 && (
|
{((downloadStatus == DownloadStatus.NOT_DOWNLOADED) || !loadedImage) && preview.length >= 20 && (
|
||||||
<>
|
<>
|
||||||
<img style={{
|
<img style={{
|
||||||
minHeight: 220,
|
minHeight: 220,
|
||||||
@@ -85,8 +85,8 @@ export function MessageImage(props: AttachmentProps) {
|
|||||||
objectFit: 'cover',
|
objectFit: 'cover',
|
||||||
border: '1px solid ' + colors.borderColor
|
border: '1px solid ' + colors.borderColor
|
||||||
}} src={/*block render???*/blurhashToBase64Image(preview, 200, 220)}></img>
|
}} src={/*block render???*/blurhashToBase64Image(preview, 200, 220)}></img>
|
||||||
<Portal target={mainRef.current!}>
|
<Overlay center h={'100%'} radius={8} opacity={1} color="transparent">
|
||||||
<Flex direction={'column'} pos={'absolute'} justify={'center'} top={0} h={'100%'} align={'center'} gap={'xs'}>
|
<Flex direction={'column'} pos={'absolute'} top={0} justify={'center'} h={'100%'} align={'center'} gap={'xs'}>
|
||||||
{!error && (
|
{!error && (
|
||||||
<Box style={{
|
<Box style={{
|
||||||
backgroundColor: 'rgba(0, 0, 0, 0.3)',
|
backgroundColor: 'rgba(0, 0, 0, 0.3)',
|
||||||
@@ -122,7 +122,7 @@ export function MessageImage(props: AttachmentProps) {
|
|||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
</Flex>
|
</Flex>
|
||||||
</Portal>
|
</Overlay>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user