feat: handle follow request (#2339)

This commit is contained in:
Sma11X 2023-10-23 00:11:00 +08:00 committed by GitHub
parent d825a71d1f
commit 5fceb70971
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 99 additions and 8 deletions

View file

@ -60,12 +60,19 @@ const { notification } = defineProps<{
</NuxtLink>
</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-shared-fill text-xl me-1 />
<AccountInlineInfo :account="notification.account" me1 />
<div flex px-3 py-2>
<div i-ri-user-shared-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 me-1 ws-nowrap>
{{ $t('notification.request_to_follow') }}
</span>
</div>
<!-- TODO: accept request -->
<AccountCard :account="notification.account" />
<AccountCard p="s-2 e-4 b-2" hover-card :account="notification.account">
<AccountFollowRequestButton :account="notification.account" />
</AccountCard>
</template>
<template v-else-if="notification.type === 'update'">
<StatusCard :status="notification.status!" :in-notification="true" :actions="false">