mirror of
https://github.com/tulir/gomuks.git
synced 2025-04-19 18:13:41 -05:00
parent
7cad53bb7d
commit
eda7d6790e
2 changed files with 8 additions and 1 deletions
|
@ -59,7 +59,10 @@ const MediaMessageBody = ({ event, room, sender }: EventContentProps) => {
|
|||
}
|
||||
}
|
||||
const renderMediaElem = !supportsClickToShow || showPreviewsByDefault || clickedShow
|
||||
const renderPlaceholderElem = supportsClickToShow && (!renderMediaElem || !!contentWarning || !loaded)
|
||||
const renderPlaceholderElem = supportsClickToShow
|
||||
&& (!renderMediaElem
|
||||
|| (contentWarning && !clickedShow)
|
||||
|| !loaded)
|
||||
const isLoadingOnlyCover = !loaded && !contentWarning && renderMediaElem
|
||||
|
||||
const [mediaContent, containerClass, containerStyle] = useMediaContent(content, event.type, undefined, onLoad)
|
||||
|
|
|
@ -215,6 +215,10 @@ div.media-container {
|
|||
border-radius: .25rem;
|
||||
}
|
||||
|
||||
&:has(> div.empty-placeholder) + img {
|
||||
filter: blur(16px);
|
||||
}
|
||||
|
||||
& + img {
|
||||
/* In order loading=lazy to work, the image has to be visible,
|
||||
so put it behind the placeholder instead of below */
|
||||
|
|
Loading…
Add table
Reference in a new issue