From 70311b1c65f8bd0bd91ce236c34348c59ae9e396 Mon Sep 17 00:00:00 2001 From: Xyphyn Date: Sun, 10 Sep 2023 16:45:22 -0700 Subject: [PATCH] fix: overflow issue --- src/lib/components/lemmy/post/Post.svelte | 61 ++++++++++++----------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/src/lib/components/lemmy/post/Post.svelte b/src/lib/components/lemmy/post/Post.svelte index d6facefa..f7761a15 100644 --- a/src/lib/components/lemmy/post/Post.svelte +++ b/src/lib/components/lemmy/post/Post.svelte @@ -21,10 +21,13 @@ let loaded = false // hack because you cant use typescript types in svelte markup - const onclick = (e: any) => { - if (e.target?.id == post.post.id) { - goto(postLink(post.post)) + const onclick = ( + e: MouseEvent & { + currentTarget: EventTarget & HTMLDivElement + target: any } + ) => { + if (e.target.id == post.post.id) goto(postLink(post.post)) } @@ -45,36 +48,34 @@ > {#if view == 'list' || view == 'compact'}
{/if}
-
-
- - - - -
+
+ + + + {#if $userSettings.view == 'card'} {#if isImage(post.post.url)} @@ -145,7 +146,7 @@ {/if}
{#if ($userSettings.view == 'list' || $userSettings.view == 'compact') && (post.post.thumbnail_url || isImage(post.post.url))} -
+
{#if !$userSettings.expandImages || (post.post.thumbnail_url && !isImage(post.post.url))} {#if post.post.thumbnail_url}