fix: invalid dates
This commit is contained in:
1 parent
facb1081c9
commit
0d08df2ad5
7 files changed
+23
-19
No files matched your search
@@ -1,6 +1,7 @@
|
||||
<script lang="ts">
|
||||
import Comment from '$lib/components/lemmy/comment/Comment.svelte'
|
||||
import PostMeta from '$lib/components/lemmy/post/PostMeta.svelte'
|
||||
import { publishedToDate } from '$lib/components/util/date.js'
|
||||
import { getInstance } from '$lib/lemmy.js'
|
||||
import { userSettings } from '$lib/settings.js'
|
||||
import type { CommentView } from 'lemmy-js-client'
|
||||
@@ -23,7 +24,7 @@
|
||||
deleted={false}
|
||||
featured={false}
|
||||
nsfw={comment.post.nsfw}
|
||||
published={new Date(comment.post.published + 'Z')}
|
||||
published={publishedToDate(comment.comment.published)}
|
||||
saved={false}
|
||||
community={community ? comment.community : undefined}
|
||||
/>
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
import ExpandableImage from '$lib/components/ui/ExpandableImage.svelte'
|
||||
import { bestImageURL, postLink } from '$lib/components/lemmy/post/helpers.js'
|
||||
import Empty from '$lib/components/helper/Empty.svelte'
|
||||
import { publishedToDate } from '$lib/components/util/date.js'
|
||||
|
||||
export let post: PostView
|
||||
export let actions: boolean = true
|
||||
@@ -48,7 +49,7 @@
|
||||
<PostMeta
|
||||
community={hideCommunity ? undefined : post.community}
|
||||
user={post.creator}
|
||||
published={new Date(post.post.published + 'Z')}
|
||||
published={publishedToDate(post.post.published)}
|
||||
upvotes={post.counts.upvotes}
|
||||
downvotes={post.counts.downvotes}
|
||||
deleted={post.post.deleted}
|
||||
|
||||
@@ -22,12 +22,7 @@
|
||||
{#if avatar}
|
||||
<Avatar url={user.avatar} alt={user.name} width={avatarSize} />
|
||||
{/if}
|
||||
<span
|
||||
class="flex flex-wrap gap-0"
|
||||
class:ml-0.5={avatar}
|
||||
class:text-red-500={user.admin}
|
||||
class:font-bold={user.admin}
|
||||
>
|
||||
<span class="flex flex-wrap gap-0" class:ml-0.5={avatar}>
|
||||
<span class:font-medium={showInstance}>
|
||||
{user.display_name || user.name}
|
||||
</span>
|
||||
@@ -38,11 +33,6 @@
|
||||
{/if}
|
||||
</span>
|
||||
{#if badges}
|
||||
{#if user.admin}
|
||||
<div class="text-red-500" title="Admin">
|
||||
<ShieldIcon width={12} filled />
|
||||
</div>
|
||||
{/if}
|
||||
{#if user.banned}
|
||||
<div class="text-red-500" title="Banned">
|
||||
<Icon src={NoSymbol} mini size="12" />
|
||||
|
||||
Reference in new issue
Block a user