mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-02 23:19:57 +00:00
727d05915f
* fix: rtl arrows on settings page * fix: border on settings page for RTL languages * fix: RTL fixes for logo, search box and logout icon * fix: RTL layout bugs in conversations * chore: remove rtl setting icon * improve arabic locale * add new entries to arabic locale * chore: include number format * fix: RTL layout on several pages * fix: RTL layout of account header and sign in modal * fix: always display account handle in LTR * fix: move character counter in publish widget to left side for RTL * fix: remove border-ss-none unocss rule * fix: many RTL fixes * fix: RTL fixes for many pages * fix: use viewer's direction in all content * chore: use new arabic plural rules * chore: flip arrow on main content header * chore: fix StatusPoll and show_new_items for zh-TW * chore: StatusPoll tooltip on bottom * chore: add `en` variants to i18n conf * chore: update entry to use new plural rule * fix: automatic content direction for status * fix: direction for account handle * fix: direction of polls Co-authored-by: userquin <userquin@gmail.com> Co-authored-by: Jean-Paul Khawam <jeanpaulkhawam@protonmail.com> Co-authored-by: Daniel Roe <daniel@roe.dev>
71 lines
2.2 KiB
Vue
71 lines
2.2 KiB
Vue
<script setup lang="ts">
|
|
import type { GroupedNotifications } from '~/types'
|
|
|
|
const { items } = defineProps<{
|
|
items: GroupedNotifications
|
|
}>()
|
|
|
|
const { formatHumanReadableNumber, forSR } = useHumanReadableNumber()
|
|
|
|
const count = $computed(() => items.items.length)
|
|
const addSR = $computed(() => forSR(count))
|
|
const isExpanded = ref(false)
|
|
const lang = $computed(() => {
|
|
return count > 1 || count === 0 ? undefined : items.items[0].status?.language
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<article flex flex-col relative :lang="lang ?? undefined">
|
|
<div flex items-center top-0 left-2 pt-2 px-3>
|
|
<div i-ri:user-follow-fill me-3 color-primary aria-hidden="true" />
|
|
<template v-if="count > 1">
|
|
<template v-if="addSR">
|
|
<span
|
|
aria-hidden="true"
|
|
>
|
|
{{ $t('notification.followed_you_count', count, { named: { followers: formatHumanReadableNumber(count) } }) }}
|
|
</span>
|
|
<span sr-only>
|
|
{{ $t('notification.followed_you_count', count, { named: { followers: count } }) }}
|
|
</span>
|
|
</template>
|
|
<span v-else>
|
|
{{ $t('notification.followed_you_count', count, { named: { followers: count } }) }}
|
|
</span>
|
|
</template>
|
|
<template v-else>
|
|
<ContentRich
|
|
text-primary me-1 font-bold line-clamp-1 ws-pre-wrap break-all
|
|
:content="getDisplayName(items.items[0]?.account, { rich: true })"
|
|
:emojis="items.items[0]?.account.emojis"
|
|
/>
|
|
<span me-1 ws-nowrap>
|
|
{{ $t('notification.followed_you') }}
|
|
</span>
|
|
</template>
|
|
</div>
|
|
<div pb-2>
|
|
<div v-if="isExpanded">
|
|
<AccountCard
|
|
v-for="item in items.items"
|
|
:key="item.id"
|
|
:account="item.account"
|
|
p3
|
|
/>
|
|
</div>
|
|
<div v-else flex="~ wrap gap-1.75" p4>
|
|
<AccountHoverWrapper
|
|
v-for="item in items.items"
|
|
:key="item.id"
|
|
:account="item.account"
|
|
>
|
|
<NuxtLink :to="getAccountRoute(item.account)">
|
|
<AccountAvatar :account="item.account" w-12 h-12 />
|
|
</NuxtLink>
|
|
</AccountHoverWrapper>
|
|
</div>
|
|
</div>
|
|
</article>
|
|
</template>
|