mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-02-15 10:00:06 +00:00
render blurhash in small size
This commit is contained in:
parent
dde7263ce8
commit
e520f91df1
src/app/organisms/room/message
|
@ -98,7 +98,13 @@ export const ImageContent = as<'div', ImageContentProps>(
|
||||||
</Overlay>
|
</Overlay>
|
||||||
)}
|
)}
|
||||||
{typeof blurHash === 'string' && !load && (
|
{typeof blurHash === 'string' && !load && (
|
||||||
<BlurhashCanvas style={{ width: '100%', height: '100%' }} hash={blurHash} punch={1} />
|
<BlurhashCanvas
|
||||||
|
style={{ width: '100%', height: '100%' }}
|
||||||
|
width={32}
|
||||||
|
height={32}
|
||||||
|
hash={blurHash}
|
||||||
|
punch={1}
|
||||||
|
/>
|
||||||
)}
|
)}
|
||||||
{!autoPlay && srcState.status === AsyncStatus.Idle && (
|
{!autoPlay && srcState.status === AsyncStatus.Idle && (
|
||||||
<Box className={css.AbsoluteContainer} alignItems="Center" justifyContent="Center">
|
<Box className={css.AbsoluteContainer} alignItems="Center" justifyContent="Center">
|
||||||
|
|
|
@ -88,7 +88,13 @@ export const VideoContent = as<'div', VideoContentProps>(
|
||||||
return (
|
return (
|
||||||
<Box className={classNames(css.RelativeBase, className)} {...props} ref={ref}>
|
<Box className={classNames(css.RelativeBase, className)} {...props} ref={ref}>
|
||||||
{typeof blurHash === 'string' && !load && (
|
{typeof blurHash === 'string' && !load && (
|
||||||
<BlurhashCanvas style={{ width: '100%', height: '100%' }} hash={blurHash} punch={1} />
|
<BlurhashCanvas
|
||||||
|
style={{ width: '100%', height: '100%' }}
|
||||||
|
width={32}
|
||||||
|
height={32}
|
||||||
|
hash={blurHash}
|
||||||
|
punch={1}
|
||||||
|
/>
|
||||||
)}
|
)}
|
||||||
{thumbSrcState.status === AsyncStatus.Success && !load && (
|
{thumbSrcState.status === AsyncStatus.Success && !load && (
|
||||||
<Box className={css.AbsoluteContainer} alignItems="Center" justifyContent="Center">
|
<Box className={css.AbsoluteContainer} alignItems="Center" justifyContent="Center">
|
||||||
|
|
Loading…
Reference in a new issue