first commit
linter / quality (push) Canceled after 0s
tests / ci (8.3) (push) Canceled after 0s
tests / ci (8.4) (push) Canceled after 0s
tests / ci (8.5) (push) Canceled after 0s

This commit is contained in:
salam committed 2026-10-06 18:53:03 +02:00
commit e687b4437b
418 files changed
+33577

No files matched your search

+35
View File
@@ -0,0 +1,35 @@
<script lang="ts">
import {
Avatar,
AvatarFallback,
AvatarImage,
} from '@/components/ui/avatar';
import { getInitials } from '@/lib/initials';
import type { User } from '@/types';
let {
user,
showEmail = false,
}: {
user: User;
showEmail?: boolean;
} = $props();
const showAvatar = $derived(user.avatar && user.avatar !== '');
</script>
<Avatar class="h-8 w-8 overflow-hidden rounded-lg">
{#if showAvatar}
<AvatarImage src={user.avatar!} alt={user.name} />
{/if}
<AvatarFallback class="rounded-lg text-black dark:text-white">
{getInitials(user.name)}
</AvatarFallback>
</Avatar>
<div class="grid flex-1 text-left text-sm leading-tight">
<span class="truncate font-medium">{user.name}</span>
{#if showEmail}
<span class="truncate text-xs text-muted-foreground">{user.email}</span>
{/if}
</div>