mirror of
https://github.com/elk-zone/elk
synced 2024-12-19 00:58:01 +09: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>
98 lines
3.6 KiB
Vue
98 lines
3.6 KiB
Vue
<script setup lang="ts">
|
|
import type { Notification } from 'masto'
|
|
|
|
const { notification } = defineProps<{
|
|
notification: Notification
|
|
}>()
|
|
</script>
|
|
|
|
<template>
|
|
<article flex flex-col relative>
|
|
<template v-if="notification.type === 'follow'">
|
|
<NuxtLink :to="getAccountRoute(notification.account)">
|
|
<div
|
|
flex items-center absolute
|
|
ps-3 pe-4 inset-is-0
|
|
rounded-ie-be-3
|
|
py-3 bg-base top-0
|
|
:lang="notification.status?.language ?? undefined"
|
|
>
|
|
<div i-ri:user-follow-fill me-1 color-primary />
|
|
<ContentRich
|
|
text-primary me-1 font-bold line-clamp-1 ws-pre-wrap break-all
|
|
:content="getDisplayName(notification.account, { rich: true })"
|
|
:emojis="notification.account.emojis"
|
|
/>
|
|
<span ws-nowrap>
|
|
{{ $t('notification.followed_you') }}
|
|
</span>
|
|
</div>
|
|
<AccountBigCard
|
|
:account="notification.account"
|
|
:lang="notification.status?.language ?? undefined"
|
|
/>
|
|
</NuxtLink>
|
|
</template>
|
|
<template v-else-if="notification.type === 'admin.sign_up'">
|
|
<div flex p3 items-center bg-shaded>
|
|
<div i-ri:admin-fill me-1 color-purple />
|
|
<ContentRich
|
|
text-purple me-1 font-bold line-clamp-1 ws-pre-wrap break-all
|
|
:content="getDisplayName(notification.account, { rich: true })"
|
|
:emojis="notification.account.emojis"
|
|
/>
|
|
<span>{{ $t("notification.signed_up") }}</span>
|
|
</div>
|
|
</template>
|
|
<template v-else-if="notification.type === 'follow_request'">
|
|
<div flex ms-4 items-center class="-top-2.5" absolute inset-ie-2 px-2>
|
|
<div i-ri:user-follow-fill text-xl me-1 />
|
|
<AccountInlineInfo :account="notification.account" me1 />
|
|
</div>
|
|
<!-- TODO: accept request -->
|
|
<AccountCard :account="notification.account" />
|
|
</template>
|
|
<template v-else-if="notification.type === 'favourite'">
|
|
<StatusCard :status="notification.status!" :faded="true">
|
|
<template #meta>
|
|
<div flex="~" gap-1 items-center mt1>
|
|
<div i-ri:heart-fill text-xl me-1 color-red />
|
|
<AccountInlineInfo text-primary font-bold :account="notification.account" me1 />
|
|
</div>
|
|
</template>
|
|
</StatusCard>
|
|
</template>
|
|
<template v-else-if="notification.type === 'reblog'">
|
|
<StatusCard :status="notification.status!" :faded="true">
|
|
<template #meta>
|
|
<div flex="~" gap-1 items-center mt1>
|
|
<div i-ri:repeat-fill text-xl me-1 color-green />
|
|
<AccountInlineInfo text-primary font-bold :account="notification.account" me1 />
|
|
</div>
|
|
</template>
|
|
</StatusCard>
|
|
</template>
|
|
<template v-else-if="notification.type === 'update'">
|
|
<StatusCard :status="notification.status!" :faded="true">
|
|
<template #meta>
|
|
<div flex="~" gap-1 items-center mt1>
|
|
<div i-ri:edit-2-fill text-xl me-1 text-secondary />
|
|
<AccountInlineInfo :account="notification.account" me1 />
|
|
<span ws-nowrap>
|
|
{{ $t('notification.update_status') }}
|
|
</span>
|
|
</div>
|
|
</template>
|
|
</StatusCard>
|
|
</template>
|
|
<template v-else-if="notification.type === 'mention' || notification.type === 'poll' || notification.type === 'status'">
|
|
<StatusCard :status="notification.status!" />
|
|
</template>
|
|
<template v-else>
|
|
<div text-red font-bold>
|
|
[DEV] {{ $t('notification.missing_type') }} '{{ notification.type }}'
|
|
</div>
|
|
</template>
|
|
</article>
|
|
</template>
|