feat: add edited badge
This commit is contained in:
1 parent
b2ca5ca7ac
commit
5235db3830
2 files changed
+7
-1
No files matched your search
@@ -92,6 +92,7 @@
|
||||
: 'py-5 flex flex-col gap-2'} {$$props.class}"
|
||||
id={post.post.id.toString()}
|
||||
padding="none"
|
||||
rounding={view == 'card' ? undefined : 'none'}
|
||||
on:click={(e) => {
|
||||
onClick(e)
|
||||
}}
|
||||
@@ -126,6 +127,7 @@
|
||||
title={hideTitle ? undefined : tags?.title ? tags.title : post.post.name}
|
||||
read={post.read}
|
||||
style="grid-area: meta;"
|
||||
edited={post.post.updated != undefined}
|
||||
tags={tags?.tags}
|
||||
{view}
|
||||
>
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
import { userSettings, type View } from '$lib/settings'
|
||||
import Markdown from '$lib/components/markdown/Markdown.svelte'
|
||||
import { t } from '$lib/translations'
|
||||
import type { IconSource } from 'svelte-hero-icons'
|
||||
import { Pencil, type IconSource } from 'svelte-hero-icons'
|
||||
|
||||
export let community: Community | undefined = undefined
|
||||
export let showCommunity: boolean = true
|
||||
@@ -74,6 +74,7 @@
|
||||
export let title: string | undefined = undefined
|
||||
export let id: number | undefined = undefined
|
||||
export let read: boolean = false
|
||||
export let edited: boolean = false
|
||||
|
||||
export let view: View = 'cozy'
|
||||
|
||||
@@ -172,6 +173,9 @@
|
||||
{#if published}
|
||||
<RelativeDate date={published} class="flex-shrink-0" />
|
||||
{/if}
|
||||
{#if edited}
|
||||
<Icon src={Pencil} micro size="14" />
|
||||
{/if}
|
||||
</span>
|
||||
<div
|
||||
class="flex flex-row justify-end items-center self-center flex-wrap gap-2 [&>*]:flex-shrink-0 badges ml-2"
|
||||
|
||||
Reference in new issue
Block a user