feat: show notification timestamp (#3215)
This commit is contained in:
parent
41379627b5
commit
d94b14ae53
3 changed files with 18 additions and 8 deletions
|
@ -33,6 +33,9 @@ const unsupportedEmojiReactionTypes = ['pleroma:emoji_reaction', 'reaction']
|
|||
if (unsupportedEmojiReactionTypes.includes(notification.type) || !supportedNotificationTypes.includes(notification.type)) {
|
||||
console.warn(`[DEV] ${t('notification.missing_type')} '${notification.type}' (notification.id: ${notification.id})`)
|
||||
}
|
||||
|
||||
const timeAgoOptions = useTimeAgoOptions(true)
|
||||
const timeAgo = useTimeAgo(() => notification.createdAt, timeAgoOptions)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -48,7 +51,7 @@ if (unsupportedEmojiReactionTypes.includes(notification.type) || !supportedNotif
|
|||
<div i-ri-user-3-line text-xl me-3 color-blue />
|
||||
<AccountDisplayName :account="notification.account" text-primary me-1 font-bold line-clamp-1 ws-pre-wrap break-all />
|
||||
<span ws-nowrap>
|
||||
{{ $t('notification.followed_you') }}
|
||||
{{ $t('notification.followed_you') }}・{{ timeAgo }}
|
||||
</span>
|
||||
</div>
|
||||
<AccountBigCard
|
||||
|
@ -65,7 +68,7 @@ if (unsupportedEmojiReactionTypes.includes(notification.type) || !supportedNotif
|
|||
:account="notification.account"
|
||||
text-purple me-1 font-bold line-clamp-1 ws-pre-wrap break-all
|
||||
/>
|
||||
<span>{{ $t("notification.signed_up") }}</span>
|
||||
<span>{{ $t("notification.signed_up") }}・{{ timeAgo }}</span>
|
||||
</div>
|
||||
</NuxtLink>
|
||||
</template>
|
||||
|
@ -94,7 +97,7 @@ if (unsupportedEmojiReactionTypes.includes(notification.type) || !supportedNotif
|
|||
text-primary me-1 font-bold line-clamp-1 ws-pre-wrap break-all
|
||||
/>
|
||||
<span me-1 ws-nowrap>
|
||||
{{ $t('notification.request_to_follow') }}
|
||||
{{ $t('notification.request_to_follow') }}・{{ timeAgo }}
|
||||
</span>
|
||||
</div>
|
||||
<AccountCard p="s-2 e-4 b-2" hover-card :account="notification.account">
|
||||
|
@ -108,7 +111,7 @@ if (unsupportedEmojiReactionTypes.includes(notification.type) || !supportedNotif
|
|||
<div i-ri:edit-2-fill text-xl me-1 text-secondary />
|
||||
<AccountInlineInfo :account="notification.account" me1 />
|
||||
<span ws-nowrap>
|
||||
{{ $t('notification.update_status') }}
|
||||
{{ $t('notification.update_status') }}・{{ timeAgo }}
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue