big update: added reactions, groups, media share
CI / Go (build + vet + test) (push) Canceled after 0s
CI / Web (build + lint) (push) Canceled after 0s

This commit is contained in:
vantablackTea
2026-09-27 21:59:48 +03:00
parent ae24bdd0e0
commit 9d03ea4c51
41 changed files with 2548 additions and 172 deletions
+24
View File
@@ -1,4 +1,5 @@
import { avatarColor, initials } from '../lib/format'
import { IconUsers } from './icons'
type AvatarSize = 'sm' | 'md' | 'lg' | 'xl'
@@ -38,3 +39,26 @@ export default function Avatar({ name, seed, size = 'md', online = false, classN
</span>
)
}
interface GroupAvatarProps {
name: string
seed: number | string
size?: AvatarSize
className?: string
}
export function GroupAvatar({ name, seed, size = 'md', className = '' }: GroupAvatarProps) {
const background = avatarColor(seed)
return (
<span className={`relative inline-flex shrink-0 ${className}`}>
<span
className={`inline-flex items-center justify-center rounded-full text-white/95 shadow-inner ring-1 ring-white/10 ${SIZE_CLASSES[size]}`}
style={{ backgroundImage: `linear-gradient(145deg, ${background}, color-mix(in srgb, ${background} 62%, #000))` }}
aria-hidden="true"
title={name}
>
<IconUsers className="h-[55%] w-[55%]" />
</span>
</span>
)
}