misc: add creation stat to community header
This commit is contained in:
1 parent
09012b48e4
commit
385673bb37
2 files changed
+11
-1
No files matched your search
@@ -24,6 +24,8 @@
|
|||||||
import ShieldIcon from '../moderation/ShieldIcon.svelte'
|
import ShieldIcon from '../moderation/ShieldIcon.svelte'
|
||||||
import ItemList from '../generic/ItemList.svelte'
|
import ItemList from '../generic/ItemList.svelte'
|
||||||
import { userLink } from '$lib/lemmy/generic'
|
import { userLink } from '$lib/lemmy/generic'
|
||||||
|
import { formatRelativeDate } from '$lib/components/util/RelativeDate.svelte'
|
||||||
|
import { publishedToDate } from '$lib/components/util/date'
|
||||||
|
|
||||||
export let community: Community
|
export let community: Community
|
||||||
export let subscribed: SubscribedType
|
export let subscribed: SubscribedType
|
||||||
@@ -50,6 +52,13 @@
|
|||||||
name: $t('cards.community.activeDay'),
|
name: $t('cards.community.activeDay'),
|
||||||
value: counts.users_active_day.toString(),
|
value: counts.users_active_day.toString(),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: $t('stats.created'),
|
||||||
|
format: false,
|
||||||
|
value: formatRelativeDate(publishedToDate(community.published), {
|
||||||
|
style: 'short',
|
||||||
|
}).toString(),
|
||||||
|
},
|
||||||
]
|
]
|
||||||
: []}
|
: []}
|
||||||
bio={community.description}
|
bio={community.description}
|
||||||
|
|||||||
@@ -861,6 +861,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"stats": {
|
"stats": {
|
||||||
"joined": "Joined"
|
"joined": "Joined",
|
||||||
|
"created": "Created"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user