import { Avatar } from '#/components/atoms/avatar.jsx'; import { initial, owner } from '#/lib/authors.js'; import { bytes } from '#/lib/format.js'; import { account, repoSize } from '#/lib/git.js'; /** One reading of the account, label above value. */ function Field({ label, children }) { return (
{label}
{children}
); } /** * Whose repositories these are, beside the list of them: the account, the * name it answers to, and the server holding it. Every repository on this * page is one account's, so the account is named once here rather than on * each row. */ export function AccountPanel({ repos }) { const profile = owner(); const total = (repos ?? []).reduce((sum, repo) => sum + repoSize(repo), 0); return (
{initial(profile?.displayName || account.handle)} } className="size-20 shrink-0 lg:size-64" />
{profile?.displayName || account.handle}
{account.handle}
{profile?.description && (

{profile.description}

)}
{account.did} {account.pds.replace(/^https?:\/\//, '')} {(repos ?? []).length} ยท {bytes(total)}
); }