[ui] fix endless image loading

feat/vaults
Tomáš Mládek 2022-01-30 15:28:40 +01:00
parent e592b89e59
commit c596da7514
No known key found for this signature in database
GPG Key ID: ED21612889E75EC5
1 changed files with 5 additions and 1 deletions

View File

@ -45,11 +45,15 @@
src="/api/thumb/{address}" src="/api/thumb/{address}"
alt={address} alt={address}
on:load={() => (imageLoaded = address)} on:load={() => (imageLoaded = address)}
on:error={() => (handled = false)}
/> />
</a> </a>
{/if} {/if}
{#if mimeType == "application/pdf"} {#if mimeType == "application/pdf"}
<iframe src="/api/raw/{address}?inline" title="PDF document of {address}"/> <iframe
src="/api/raw/{address}?inline"
title="PDF document of {address}"
/>
{/if} {/if}
{#if mimeType?.startsWith("model")} {#if mimeType?.startsWith("model")}
<ModelViewer src="/api/raw/{address}" /> <ModelViewer src="/api/raw/{address}" />