This commit is contained in:
Xylight committed 2024-04-18 17:52:00 -07:00
1 parent 53bd1dda8b
commit ec57a8a73d
4 files changed
+70 -37

No files matched your search

+9 -2
View File
@@ -29,6 +29,13 @@
export let view = $userSettings.view
$: type = mediaType(post.post.url, view)
$: hideTitle =
$userSettings.posts.deduplicateEmbed &&
post.post.embed_title == post.post.name
$: hideBody =
$userSettings.posts.deduplicateEmbed &&
post.post.embed_description == post.post.body
</script>
<Material
@@ -62,7 +69,7 @@
? 'Subscribed'
: 'NotSubscribed'}
id={post.post.id}
title={post.post.name}
title={hideTitle ? undefined : post.post.name}
read={post.read}
style="grid-area: meta;"
>
@@ -77,7 +84,7 @@
{#if view == 'list' || view == 'compact'}
<PostMediaCompact {view} bind:post={post.post} style="grid-area: media;" />
{/if}
{#if post.post.body && !post.post.nsfw && view != 'compact'}
{#if post.post.body && !post.post.nsfw && view != 'compact' && !hideBody}
<PostBody body={post.post.body} {view} style="grid-area: body" />
{/if}
{#if actions}
@@ -43,7 +43,9 @@
</script>
<div
class="grid w-full meta {community ? 'grid-rows-2' : 'grid-rows-1'} text-xs"
class="grid w-full meta {community
? 'grid-rows-2'
: 'grid-rows-1'} text-xs min-w-0 max-w-full"
style={$$props.style ?? ''}
>
{#if community}
@@ -148,7 +150,7 @@
{#if title && id}
<a
href="/post/{getInstance()}/{id}"
class="font-medium text-base w-max max-w-full"
class="font-medium text-base w-full"
class:text-slate-600={$userSettings.markReadPosts && read}
class:dark:text-zinc-400={$userSettings.markReadPosts && read}
style="grid-area: title;"
+6
View File
@@ -85,6 +85,9 @@ interface Settings {
noGap: boolean
top: boolean
}
posts: {
deduplicateEmbed: boolean
}
}
export const defaultSettings: Settings = {
@@ -143,6 +146,9 @@ export const defaultSettings: Settings = {
dock: {
noGap: false,
top: false
},
posts: {
deduplicateEmbed: true
}
}