2024-04-26 07:54:02 +02:00
|
|
|
<template>
|
2024-06-10 05:24:55 +02:00
|
|
|
<component :is="disableLink ? 'div' : NuxtLink" :href="accountUrl" class="flex flex-row">
|
2024-04-27 03:28:12 +02:00
|
|
|
<Skeleton :enabled="!account" shape="rect" class="!h-12 w-12">
|
2024-05-03 05:28:31 +02:00
|
|
|
<div class="shrink-0">
|
2024-05-12 10:37:57 +02:00
|
|
|
<AvatarsCentered class="h-12 w-12 rounded ring-1 ring-white/5" :src="account?.avatar"
|
2024-04-26 08:34:57 +02:00
|
|
|
:alt="`${account?.acct}'s avatar'`" />
|
2024-04-26 07:54:02 +02:00
|
|
|
</div>
|
|
|
|
|
</Skeleton>
|
|
|
|
|
<div class="flex flex-col items-start justify-around ml-4 grow overflow-hidden">
|
|
|
|
|
<div class="flex flex-row items-center justify-between w-full">
|
|
|
|
|
<div class="font-semibold text-gray-200 line-clamp-1 break-all">
|
2024-04-27 03:28:12 +02:00
|
|
|
<Skeleton :enabled="!account" :min-width="90" :max-width="170" shape="rect">
|
2024-04-26 07:54:02 +02:00
|
|
|
{{
|
|
|
|
|
account?.display_name }}
|
|
|
|
|
</Skeleton>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<span class="text-gray-400 text-sm line-clamp-1 break-all w-full">
|
2024-04-27 03:28:12 +02:00
|
|
|
<Skeleton :enabled="!account" :min-width="130" :max-width="250" shape="rect">
|
2024-04-26 07:54:02 +02:00
|
|
|
@{{
|
|
|
|
|
account?.acct
|
|
|
|
|
}}
|
|
|
|
|
</Skeleton>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
2024-06-10 05:24:55 +02:00
|
|
|
</component>
|
2024-04-26 07:54:02 +02:00
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
|
import type { Account } from "~/types/mastodon/account";
|
2024-06-10 05:24:55 +02:00
|
|
|
import { NuxtLink } from "#components";
|
2024-04-26 07:54:02 +02:00
|
|
|
|
2024-04-27 03:28:12 +02:00
|
|
|
const props = defineProps<{
|
|
|
|
|
account?: Account;
|
2024-06-10 05:24:55 +02:00
|
|
|
disableLink?: boolean;
|
2024-04-27 03:28:12 +02:00
|
|
|
}>();
|
2024-04-26 07:54:02 +02:00
|
|
|
|
|
|
|
|
const accountUrl = props.account && `/@${props.account.acct}`;
|
|
|
|
|
</script>
|