feat: resolve project logo URLs server-side, show logos in admin + observer
All checks were successful
Build and Push Docker Image / build (push) Successful in 9m30s
All checks were successful
Build and Push Docker Image / build (push) Successful in 9m30s
Add attachProjectLogoUrls utility mirroring avatar URL pattern. Pipe project.list and analytics.getAllProjects through logo URL resolver so ProjectLogo components receive presigned URLs. Add logos to observer projects table and mobile cards. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -47,6 +47,7 @@ import {
|
||||
} from 'lucide-react'
|
||||
import { cn } from '@/lib/utils'
|
||||
import { useDebouncedCallback } from 'use-debounce'
|
||||
import { ProjectLogo } from '@/components/shared/project-logo'
|
||||
|
||||
|
||||
export function ObserverProjectsContent() {
|
||||
@@ -322,19 +323,29 @@ export function ObserverProjectsContent() {
|
||||
className="cursor-pointer hover:bg-muted/50"
|
||||
onClick={() => router.push(`/observer/projects/${project.id}`)}
|
||||
>
|
||||
<TableCell className="pl-6 max-w-[260px]">
|
||||
<Link
|
||||
href={`/observer/projects/${project.id}` as Route}
|
||||
className="font-medium hover:underline truncate block"
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
>
|
||||
{project.title}
|
||||
</Link>
|
||||
{project.teamName && (
|
||||
<p className="text-xs text-muted-foreground truncate">
|
||||
{project.teamName}
|
||||
</p>
|
||||
)}
|
||||
<TableCell className="pl-6 max-w-[300px]">
|
||||
<div className="flex items-center gap-3">
|
||||
<ProjectLogo
|
||||
project={project}
|
||||
logoUrl={project.logoUrl}
|
||||
size="sm"
|
||||
fallback="initials"
|
||||
/>
|
||||
<div className="min-w-0">
|
||||
<Link
|
||||
href={`/observer/projects/${project.id}` as Route}
|
||||
className="font-medium hover:underline truncate block"
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
>
|
||||
{project.title}
|
||||
</Link>
|
||||
{project.teamName && (
|
||||
<p className="text-xs text-muted-foreground truncate">
|
||||
{project.teamName}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</TableCell>
|
||||
<TableCell className="text-sm">
|
||||
{project.country ?? '-'}
|
||||
@@ -395,15 +406,23 @@ export function ObserverProjectsContent() {
|
||||
<Card className="transition-colors hover:bg-muted/50">
|
||||
<CardContent className="pt-4 space-y-2">
|
||||
<div className="flex items-start justify-between gap-2">
|
||||
<div className="min-w-0">
|
||||
<p className="font-medium text-sm leading-tight truncate">
|
||||
{project.title}
|
||||
</p>
|
||||
{project.teamName && (
|
||||
<p className="text-xs text-muted-foreground truncate">
|
||||
{project.teamName}
|
||||
<div className="flex items-center gap-3 min-w-0">
|
||||
<ProjectLogo
|
||||
project={project}
|
||||
logoUrl={project.logoUrl}
|
||||
size="sm"
|
||||
fallback="initials"
|
||||
/>
|
||||
<div className="min-w-0">
|
||||
<p className="font-medium text-sm leading-tight truncate">
|
||||
{project.title}
|
||||
</p>
|
||||
)}
|
||||
{project.teamName && (
|
||||
<p className="text-xs text-muted-foreground truncate">
|
||||
{project.teamName}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<StatusBadge status={project.observerStatus ?? project.status} />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user