style: show entire image preview in room timeline
This commit is contained in:
parent
9ecb233763
commit
77ab3fba1e
3 changed files with 5 additions and 5 deletions
|
@ -9,7 +9,7 @@ export const Attachment = recipe({
|
||||||
borderRadius: config.radii.R400,
|
borderRadius: config.radii.R400,
|
||||||
overflow: 'hidden',
|
overflow: 'hidden',
|
||||||
maxWidth: '100%',
|
maxWidth: '100%',
|
||||||
width: toRem(400),
|
// width: toRem(400),
|
||||||
},
|
},
|
||||||
variants: {
|
variants: {
|
||||||
outlined: {
|
outlined: {
|
||||||
|
@ -31,7 +31,7 @@ export const AttachmentBox = style([
|
||||||
{
|
{
|
||||||
maxWidth: '100%',
|
maxWidth: '100%',
|
||||||
maxHeight: toRem(600),
|
maxHeight: toRem(600),
|
||||||
width: toRem(400),
|
// width: toRem(400),
|
||||||
overflow: 'hidden',
|
overflow: 'hidden',
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
|
@ -1100,13 +1100,13 @@ export function RoomTimeline({ room, eventId, roomInputRef, editor }: RoomTimeli
|
||||||
if (typeof mxcUrl !== 'string') {
|
if (typeof mxcUrl !== 'string') {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
const height = scaleYDimension(imgInfo?.w || 400, 400, imgInfo?.h || 400);
|
// const height = scaleYDimension(imgInfo?.w || 400, 400, imgInfo?.h || 400);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Attachment>
|
<Attachment>
|
||||||
<AttachmentBox
|
<AttachmentBox
|
||||||
style={{
|
style={{
|
||||||
height: toRem(height < 48 ? 48 : height),
|
// height: toRem(height < 48 ? 48 : height),
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<ImageContent
|
<ImageContent
|
||||||
|
|
|
@ -121,7 +121,7 @@ export const ImageContent = as<'div', ImageContentProps>(
|
||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
{srcState.status === AsyncStatus.Success && (
|
{srcState.status === AsyncStatus.Success && (
|
||||||
<Box className={css.AbsoluteContainer}>
|
<Box className={css.AbsoluteContainer} style={{position: 'unset'}}>
|
||||||
<Image
|
<Image
|
||||||
alt={body}
|
alt={body}
|
||||||
title={body}
|
title={body}
|
||||||
|
|
Loading…
Reference in a new issue