feat(account): display moved account on profile

closes #330
This commit is contained in:
三咲智子 2022-12-05 01:28:22 +08:00
parent f33b6b58cd
commit 2672af671c
No known key found for this signature in database
GPG key ID: 69992F2250DFD93E
4 changed files with 36 additions and 1 deletions

View file

@ -0,0 +1,30 @@
<script setup lang="ts">
import type { Account } from 'masto'
defineProps<{
account: Account
}>()
</script>
<template>
<div flex="~ col gap-2" p4>
<div flex="~ gap-1" justify-center>
<AccountInlineInfo :account="account" :link="false" />
{{ $t('account.moved_title') }}
</div>
<div flex>
<NuxtLink :to="getAccountRoute(account.moved as any)">
<AccountInfo :account="account.moved" />
</NuxtLink>
<div flex-auto />
<div flex items-center>
<NuxtLink :to="getAccountRoute(account.moved as any)">
<button btn-solid h-fit>
{{ $t('account.go_to_profile') }}
</button>
</NuxtLink>
</div>
</div>
</div>
</template>

View file

@ -12,7 +12,9 @@
"following": "Following",
"following_count": "{0} Following",
"follows_you": "Follows you",
"go_to_profile": "Go to profile",
"joined": "Joined",
"moved_title": "has indicated that their new account is now:",
"muted_users": "Muted users",
"mutuals": "Mutuals",
"pinned": "Pinned",

View file

@ -12,7 +12,9 @@
"following": "关注中",
"following_count": "正在关注 {0} 人",
"follows_you": "已关注你",
"go_to_profile": "转到个人资料",
"joined": "已加入",
"moved_title": "的新账号是:",
"muted_users": "已屏蔽的用户",
"mutuals": "互相关注",
"pinned": "置顶的帖文",

View file

@ -27,7 +27,8 @@ onReactivated(() => {
</template>
<template v-if="account">
<AccountHeader :account="account" command border="b base" />
<AccountMoved v-if="account.moved" :account="account" />
<AccountHeader :account="account" command border="b base" :class="{ 'op-50 grayscale-50': !!account.moved }" />
<div v-if="relationship?.blockedBy" h-30 flex="~ col center gap-2">
<div text-secondary>