- 디자인 시스템: #151515 배경, 1px 보더 카드, CSS vars, mono 포인트 - GlobalStyle/theme.ts v2 (DESIGN-SYSTEM.md 기반) - 공통 컴포넌트 (ui/base.tsx): LabelMeta, BracketValue, Card, TechBar, Timeline 등 - Sidebar: [대시] 브라켓 네비 + 모바일 하단 탭바 (767px) - LayoutShell: SidebarContext 제거, 단순화 - 대시보드 (/): SYS 상태 카드 4개 + ONGOING PROJECTS + ACTIVITY FEED - 활동 로그 (/activities): 로그 테이블 + 필터 + 검색 + 페이지네이션 (신규) - 설정 (/settings): 4섹션 Toggle/Bracket Input 그리드 - 자매 노드 관리 (/sisters): 3열 수평 레이아웃 (INFO/GRAPH/SYNC) - 자매 상세 (/sisters/[name]): 간소화 + 터미널 스타일 - 조직도 (/org): 터미널 카드 트리 구조 + 레벨 색상 - 프로젝트 목록 (/projects): 새 라우트 - 프로젝트 상세 (/projects/[id]): Phase Timeline + Audit Log + Checklist - FE 14 routes build 성공
102 lines
2.4 KiB
TypeScript
102 lines
2.4 KiB
TypeScript
'use client';
|
|
|
|
import React, { useEffect, useState } from 'react';
|
|
import styled from 'styled-components';
|
|
import { API_URL } from '@/lib/config';
|
|
|
|
const Grid = styled.div`
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
|
gap: 16px;
|
|
`;
|
|
|
|
const Card = styled.a`
|
|
display: block;
|
|
background: var(--bg-surface);
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 10px;
|
|
padding: 18px 20px;
|
|
text-decoration: none;
|
|
transition: transform 0.15s, border-color 0.15s;
|
|
|
|
&:hover {
|
|
transform: translateY(-2px);
|
|
border-color: rgba(88,166,255,0.3);
|
|
}
|
|
`;
|
|
|
|
const RepoName = styled.div`
|
|
font-size: 14px;
|
|
font-weight: 700;
|
|
color: #58A6FF;
|
|
margin-bottom: 6px;
|
|
`;
|
|
|
|
const RepoDesc = styled.div`
|
|
font-size: 12px;
|
|
color: var(--text-secondary);
|
|
margin-bottom: 12px;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
`;
|
|
|
|
const Stats = styled.div`
|
|
display: flex;
|
|
gap: 14px;
|
|
`;
|
|
|
|
const Stat = styled.span`
|
|
font-size: 12px;
|
|
color: var(--text-secondary);
|
|
`;
|
|
|
|
const PRBadge = styled.span<{ $count: number }>`
|
|
font-size: 11px;
|
|
padding: 2px 8px;
|
|
border-radius: 4px;
|
|
font-weight: 600;
|
|
background: ${({ $count }) => $count > 0 ? 'rgba(88,166,255,0.12)' : 'rgba(139,148,158,0.08)'};
|
|
color: ${({ $count }) => $count > 0 ? '#58A6FF' : 'var(--text-secondary)'};
|
|
`;
|
|
|
|
const NoProjects = styled.div`
|
|
padding: 32px;
|
|
text-align: center;
|
|
color: var(--text-secondary);
|
|
font-size: 13px;
|
|
`;
|
|
|
|
export default function ReposPage() {
|
|
const [projects, setProjects] = useState<any[]>([]);
|
|
const [loading, setLoading] = useState(true);
|
|
|
|
useEffect(() => {
|
|
fetch(`${API_URL}/api/projects`)
|
|
.then((r) => r.json())
|
|
.then(setProjects)
|
|
.catch(() => {})
|
|
.finally(() => setLoading(false));
|
|
}, []);
|
|
|
|
if (loading) return <div style={{ color: 'var(--text-secondary)', fontSize: '14px' }}>로딩 중...</div>;
|
|
|
|
if (!projects.length) return <NoProjects>등록된 프로젝트 없음</NoProjects>;
|
|
|
|
return (
|
|
<Grid>
|
|
{projects.map((p) => (
|
|
<Card key={p.id} href={p.repoUrl} target="_blank" rel="noopener">
|
|
<RepoName>📁 {p.name}</RepoName>
|
|
{p.description && <RepoDesc>{p.description}</RepoDesc>}
|
|
<Stats>
|
|
<PRBadge $count={p.openPRs}>PR {p.openPRs}</PRBadge>
|
|
<Stat>Sprint {p.sprintCount}개</Stat>
|
|
<Stat>진행률 {p.progress}%</Stat>
|
|
</Stats>
|
|
</Card>
|
|
))}
|
|
</Grid>
|
|
);
|
|
}
|