feat(history): establish Telegram SaaS platform foundation

This commit is contained in:
wmq
2026-07-27 23:03:00 +08:00
parent cf0eed46c3
commit cd06d049fe
92 changed files with 5608 additions and 3749 deletions
+14 -1
View File
@@ -3,11 +3,13 @@ import { colorFromString, initials } from '@/utils/misc'
export function Avatar({
name,
src,
size = 'md',
className,
online,
}: {
name: string
src?: string
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
className?: string
online?: boolean
@@ -28,7 +30,18 @@ export function Avatar({
colorFromString(name || '?'),
)}
>
{initials(name)}
{src ? (
<img
src={src}
alt={name}
className="h-full w-full rounded-full object-cover"
onError={(event) => {
event.currentTarget.style.display = 'none'
event.currentTarget.nextElementSibling?.classList.remove('hidden')
}}
/>
) : null}
<span className={cn(src && 'hidden')}>{initials(name)}</span>
</span>
{online !== undefined && (
<span