feat: Switch to getSite().my_user instead of a hacky workaround
This commit is contained in:
1 parent
c3fc860117
commit
18010722a2
5 files changed
+33
-20
No files matched your search
@@ -89,6 +89,21 @@
|
||||
class="rounded-md max-h-[32rem] w-full max-w-full"
|
||||
/>
|
||||
</div>
|
||||
{:else if postRes.post.embed_video_url}
|
||||
<div class="self-start" class:blur-3xl={postRes.post.nsfw}>
|
||||
<!-- svelte-ignore a11y-media-has-caption -->
|
||||
<video class="rounded-md max-h-[32rem] w-full max-w-full" controls>
|
||||
<source src={postRes.post.embed_video_url} />
|
||||
</video>
|
||||
</div>
|
||||
{:else if postRes.post.thumbnail_url}
|
||||
<div class="self-start" class:blur-3xl={postRes.post.nsfw}>
|
||||
<img
|
||||
src={postRes.post.thumbnail_url}
|
||||
alt={postRes.post.name}
|
||||
class="rounded-md max-h-[32rem] w-full max-w-full"
|
||||
/>
|
||||
</div>
|
||||
{/if}
|
||||
{#if postRes.post.body && !postRes.post.nsfw}
|
||||
<p
|
||||
@@ -124,7 +139,7 @@
|
||||
<Icon src={Square2Stack} width={16} mini />
|
||||
Copy Link
|
||||
</MenuButton>
|
||||
{#if $user?.person_view.person.id == postRes.post.creator_id}
|
||||
{#if $user?.person.id == postRes.post.creator_id}
|
||||
<MenuButton on:click={deletePost} color={Color.dangerSecondary}>
|
||||
<Icon src={Trash} width={16} mini />
|
||||
Delete
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
</script>
|
||||
|
||||
<StickyCard>
|
||||
<!-- {#if site.site.icon} -->
|
||||
<!-- <Avatar width={64} url={site.site.icon} alt={site.site.name} /> -->
|
||||
<!-- {/if} -->
|
||||
{#if site.site.icon}
|
||||
<Avatar width={64} url={site.site.icon} alt={site.site.name} />
|
||||
{/if}
|
||||
<span class="flex flex-row items-center gap-1 text-sm">
|
||||
<Icon src={Calendar} width={16} height={16} mini />
|
||||
<RelativeDate date={new Date(site.site.published)} />
|
||||
|
||||
Reference in new issue
Block a user