mirror of
https://github.com/tulir/gomuks.git
synced 2025-04-20 18:43:41 -05:00
web/timeline: fix implementation of media spoilers
Signed-off-by: Sumner Evans <me@sumnerevans.com>
This commit is contained in:
parent
5fbb8a21ab
commit
6a00eaff89
2 changed files with 5 additions and 3 deletions
|
@ -14,7 +14,7 @@
|
|||
--small-font-size: .875rem;
|
||||
|
||||
--code-background-color: rgba(0, 0, 0, 0.15);
|
||||
--media-placeholder-default-background: rgba(0, 0, 0, .1);
|
||||
--media-placeholder-default-background: #ccc;
|
||||
--media-placeholder-button-background: rgba(255, 255, 255, .5);
|
||||
|
||||
--primary-color: #00c853;
|
||||
|
@ -102,7 +102,7 @@
|
|||
--link-text-color: #4187eb;
|
||||
|
||||
--code-background-color: rgba(255, 255, 255, 0.1);
|
||||
--media-placeholder-default-background: rgba(255, 255, 255, .1);
|
||||
--media-placeholder-default-background: #333;
|
||||
--media-placeholder-button-background: rgba(0, 0, 0, .5);
|
||||
|
||||
--primary-color: #00b24a;
|
||||
|
|
|
@ -59,7 +59,9 @@ const MediaMessageBody = ({ event, room, sender }: EventContentProps) => {
|
|||
}
|
||||
}
|
||||
const renderMediaElem = !supportsClickToShow || showPreviewsByDefault || clickedShow
|
||||
const renderPlaceholderElem = supportsClickToShow && (!renderMediaElem || !!contentWarning || !loaded)
|
||||
const renderPlaceholderElem = supportsClickToShow
|
||||
&& !clickedShow
|
||||
&& (!renderMediaElem || !!contentWarning || !loaded)
|
||||
const isLoadingOnlyCover = !loaded && !contentWarning && renderMediaElem
|
||||
|
||||
const [mediaContent, containerClass, containerStyle] = useMediaContent(content, event.type, undefined, onLoad)
|
||||
|
|
Loading…
Add table
Reference in a new issue