- Updated .env.example to include configuration for OnlyOffice Document Server. - Modified the workspace configuration to remove the drive-suite path. - Adjusted TypeScript environment imports for consistency. - Enhanced Next.js configuration to disable canvas in Webpack. - Updated package.json to include new dependencies for OnlyOffice and PDF.js. - Added global styles for OnlyOffice theme integration in the CSS. - Created new layout and page components for the Drive feature, including public sharing and editing functionalities. - Updated metadata handling across various layouts to reflect the new app structure.
41 lines
869 B
TypeScript
41 lines
869 B
TypeScript
"use client"
|
|
|
|
import { avatarColor, senderInitial } from "@/lib/sender-display"
|
|
import { cn } from "@/lib/utils"
|
|
|
|
interface AccountAvatarProps {
|
|
account: { name: string; email: string }
|
|
size?: "sm" | "md" | "lg"
|
|
className?: string
|
|
}
|
|
|
|
const sizeClasses = {
|
|
sm: "size-8 text-sm",
|
|
md: "size-10 text-base",
|
|
lg: "size-20 text-3xl",
|
|
} as const
|
|
|
|
export function AccountAvatar({
|
|
account,
|
|
size = "md",
|
|
className,
|
|
}: AccountAvatarProps) {
|
|
const displayName = account.name || account.email
|
|
const initial = senderInitial(displayName)
|
|
const color = avatarColor(displayName)
|
|
|
|
return (
|
|
<div
|
|
className={cn(
|
|
"flex shrink-0 items-center justify-center rounded-full font-medium text-white",
|
|
sizeClasses[size],
|
|
className,
|
|
)}
|
|
style={{ backgroundColor: color }}
|
|
aria-hidden
|
|
>
|
|
{initial}
|
|
</div>
|
|
)
|
|
}
|