Fix link detail for authenticated images

This commit is contained in:
Jon Staab
2025-04-29 12:30:01 -07:00
parent 6ddba63ff9
commit c582082816
3 changed files with 7 additions and 7 deletions

View File

@@ -27,7 +27,7 @@
hideImage = true
}
const expand = () => pushModal(ContentLinkDetail, {url}, {fullscreen: true})
const expand = () => pushModal(ContentLinkDetail, {value, event}, {fullscreen: true})
</script>
<Link external href={url} class="my-2 block">
@@ -38,7 +38,7 @@
</video>
{:else if url.match(/\.(jpe?g|png|gif|webp)$/)}
<button type="button" onclick={stopPropagation(preventDefault(expand))}>
<ContentLinkBlockImage {event} {value} />
<ContentLinkBlockImage {value} {event} class="m-auto max-h-96 rounded-box" />
</button>
{:else}
{#await loadPreview()}

View File

@@ -5,7 +5,7 @@
import {signer} from "@welshman/app"
import {imgproxy} from "@app/state"
const {value, event} = $props()
const {value, event, ...props} = $props()
const url = value.url.toString()
@@ -46,4 +46,4 @@
})
</script>
<img alt="" {src} {onerror} class="m-auto max-h-96 rounded-box" />
<img alt="" {src} {onerror} {...props} />

View File

@@ -1,12 +1,12 @@
<script lang="ts">
import ContentLinkBlockImage from "@app/components/ContentLinkBlockImage.svelte"
import Button from "@lib/components/Button.svelte"
import {imgproxy} from "@app/state"
const {url} = $props()
const {value, event} = $props()
const back = () => history.back()
</script>
<Button class="m-auto h-screen w-screen cursor-pointer p-4" onclick={back}>
<img alt="" src={imgproxy(url)} class="m-auto max-h-full max-w-full rounded-box" />
<ContentLinkBlockImage {value} {event} class="m-auto max-h-full max-w-full rounded-box" />
</Button>