elk/components/account/AccountCard.vue

29 lines
659 B
Vue
Raw Normal View History

<script setup lang="ts">
2023-01-08 07:21:09 +01:00
import type { mastodon } from 'masto'
const { account } = defineProps<{
2023-01-08 07:21:09 +01:00
account: mastodon.v1.Account
2022-11-28 18:24:39 +01:00
hoverCard?: boolean
relationshipContext?: 'followedBy' | 'following'
}>()
2022-11-24 08:53:27 +01:00
cacheAccount(account)
</script>
<template>
2022-11-23 15:39:48 +01:00
<div flex justify-between hover:bg-active transition-100>
2022-11-28 18:24:39 +01:00
<AccountInfo
:account="account" hover p1 as="router-link"
:hover-card="hoverCard"
2022-11-30 22:38:18 +01:00
shrink
overflow-hidden
:to="getAccountRoute(account)"
2022-11-28 18:24:39 +01:00
/>
2023-10-22 18:11:00 +02:00
<slot>
<div h-full p1 shrink-0>
<AccountFollowButton :account="account" :context="relationshipContext" />
</div>
</slot>
</div>
</template>