/
ncit
/
c4panelmodel
Обзор
Документация
Войти
/
ncit
/
c4panelmodel
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
main
src/lib/components/widgets/ProjectCard.svelte
42 строки
1 KB
ncit
feat: rewrite hooks.server.ts to use Supabase Auth
07 июн 2026, 19:32
07 июн 2026, 19:32
b6162ab
Код
Авторство
О чём код?
<script lang="ts"> import { relativeTime } from '$lib/utils/date'; import { Boxes, Network, Workflow } from '@lucide/svelte'; interface Props { project: { id: string; name: string; description: string | null; updatedAt: Date | string; objectCount: number; diagramCount: number; flowCount: number; firstDiagramId: string | null; }; } let { project }: Props = $props(); const href = $derived( project.firstDiagramId ? `/project/${project.id}/diagram/${project.firstDiagramId}` : `/project/${project.id}` ); </script> <a {href} class="group flex flex-col rounded-xl border border-slate-200 bg-white p-4 transition-shadow hover:shadow-md" > <div class="flex items-start justify-between"> <h3 class="font-semibold text-slate-900 group-hover:text-blue-600">{project.name}</h3> </div> <p class="mt-1 line-clamp-2 min-h-[2.5rem] text-sm text-slate-500"> {project.description || 'No description'} </p> <div class="mt-3 flex items-center gap-4 text-xs text-slate-400"> <span class="flex items-center gap-1"><Boxes size={13} /> {project.objectCount}</span> <span class="flex items-center gap-1"><Network size={13} /> {project.diagramCount}</span> <span class="flex items-center gap-1"><Workflow size={13} /> {project.flowCount}</span> <span class="ml-auto">{relativeTime(project.updatedAt)}</span> </div> </a>