Now images will show inline when viewing a post.
This commit is contained in:
@@ -128,6 +128,26 @@ onDestroy(() => {
|
|||||||
</a> -->
|
</a> -->
|
||||||
|
|
||||||
{#if $ae_loc.authenticated_access && linked_obj?.hosted_file_id_random}
|
{#if $ae_loc.authenticated_access && linked_obj?.hosted_file_id_random}
|
||||||
|
{#if linked_obj.extension === 'png' || linked_obj.extension === 'jpg' || linked_obj.extension === 'jpeg' || linked_obj.extension === 'gif' || linked_obj.extension === 'webp' || linked_obj.extension === 'svg'}
|
||||||
|
<div>
|
||||||
|
<img src="{$ae_api.base_url}/hosted_file/{linked_obj?.hosted_file_id_random}/download?x_no_account_id_token=direct-download"
|
||||||
|
alt={linked_obj.filename}
|
||||||
|
class="w-fit min-w-96 h-fit object-cover rounded-lg shadow-md"
|
||||||
|
/>
|
||||||
|
<!-- <img src={api.download_hosted_file({
|
||||||
|
api_cfg: $ae_api,
|
||||||
|
hosted_file_id: linked_obj.hosted_file_id_random,
|
||||||
|
return_file: true,
|
||||||
|
filename: linked_obj.filename,
|
||||||
|
auto_download: false,
|
||||||
|
log_lvl: 1
|
||||||
|
})
|
||||||
|
}
|
||||||
|
alt={linked_obj.filename}
|
||||||
|
class="w-fit min-w-96 h-fit object-cover rounded-lg shadow-md"
|
||||||
|
/> -->
|
||||||
|
</div>
|
||||||
|
{:else}
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
disabled={!$ae_loc.trusted_access}
|
disabled={!$ae_loc.trusted_access}
|
||||||
@@ -164,6 +184,7 @@ onDestroy(() => {
|
|||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user