2022-11-13 14:34:43 +09:00
|
|
|
<script setup lang="ts">
|
2022-11-14 11:20:07 +09:00
|
|
|
import type { Account } from 'masto'
|
2022-11-13 14:34:43 +09:00
|
|
|
|
2022-11-28 04:40:16 +09:00
|
|
|
const { account, as = 'div' } = defineProps<{
|
2022-11-13 14:34:43 +09:00
|
|
|
account: Account
|
2022-11-28 04:40:16 +09:00
|
|
|
as?: string
|
2022-11-13 14:34:43 +09:00
|
|
|
}>()
|
2022-11-28 04:40:16 +09:00
|
|
|
|
|
|
|
defineOptions({
|
|
|
|
inheritAttrs: false,
|
|
|
|
})
|
2022-11-13 14:34:43 +09:00
|
|
|
</script>
|
|
|
|
|
2022-11-27 09:19:45 +09:00
|
|
|
<!-- TODO: Make this work for both buttons and links -->
|
|
|
|
<!-- This is sometimes (like in the sidebar) used directly as a button, and sometimes, like in follow notifications, as a link. I think this component may need a second refactor that either lets an implementation pass in a link or an action and adapt to what's passed in, or the implementations need to be updated to wrap in the action they want to take and this be just the layout for these items -->
|
2022-11-13 14:34:43 +09:00
|
|
|
<template>
|
2022-11-28 04:40:16 +09:00
|
|
|
<component :is="as" flex gap-3 v-bind="$attrs">
|
2022-11-27 12:34:55 +09:00
|
|
|
<AccountAvatar :account="account" w-12 h-12 />
|
|
|
|
<div flex="~ col">
|
2022-11-27 12:54:46 +09:00
|
|
|
<ContentRich font-bold :content="getDisplayName(account, { rich: true })" :emojis="account.emojis" />
|
2022-11-27 05:41:18 +09:00
|
|
|
<AccountHandle :account="account" text-sm />
|
2022-11-27 12:34:55 +09:00
|
|
|
</div>
|
2022-11-28 04:40:16 +09:00
|
|
|
</component>
|
2022-11-13 14:34:43 +09:00
|
|
|
</template>
|