mirror of
https://github.com/tulir/gomuks.git
synced 2025-04-20 10:33:41 -05:00
web/timeline: allow opening lightbox from url preview image
This commit is contained in:
parent
6830e5d1cc
commit
588a994b55
1 changed files with 2 additions and 0 deletions
|
@ -19,6 +19,7 @@ import { RoomStateStore, usePreference } from "@/api/statestore"
|
||||||
import { MemDBEvent, URLPreview } from "@/api/types"
|
import { MemDBEvent, URLPreview } from "@/api/types"
|
||||||
import { ImageContainerSize, calculateMediaSize } from "@/util/mediasize"
|
import { ImageContainerSize, calculateMediaSize } from "@/util/mediasize"
|
||||||
import ClientContext from "../ClientContext"
|
import ClientContext from "../ClientContext"
|
||||||
|
import { LightboxContext } from "../modal/Lightbox.tsx"
|
||||||
import "./URLPreviews.css"
|
import "./URLPreviews.css"
|
||||||
|
|
||||||
const URLPreviews = ({ event, room }: {
|
const URLPreviews = ({ event, room }: {
|
||||||
|
@ -58,6 +59,7 @@ const URLPreviews = ({ event, room }: {
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
style={style.media}
|
style={style.media}
|
||||||
src={mediaURL}
|
src={mediaURL}
|
||||||
|
onClick={use(LightboxContext)!}
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Reference in a new issue