Files
hanarang-dashboard/frontend/components/common/StatusBadge.tsx
narang-ai 230d3847ef feat(redesign-v2): 미니멀 터미널 UI 전체 리디자인
- 디자인 시스템: #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 성공
2026-04-04 13:10:57 +09:00

63 lines
1.3 KiB
TypeScript

'use client';
import React from 'react';
import styled from 'styled-components';
import { theme } from '@/styles/theme';
type Status = 'online' | 'offline' | 'working' | 'unknown';
interface StatusBadgeProps {
status: Status;
}
const statusLabels: Record<Status, string> = {
online: '온라인',
offline: '오프라인',
working: '작업중',
unknown: '알 수 없음',
};
const statusColors: Record<Status, string> = {
online: '#00FF00',
offline: '#FF1744',
working: '#2979FF',
unknown: 'var(--text-secondary)',
};
const BadgeWrapper = styled.span<{ $status: Status }>`
display: inline-flex;
align-items: center;
gap: 6px;
font-size: 12px;
font-weight: 500;
color: ${({ $status }) => statusColors[$status]};
`;
const Dot = styled.span<{ $status: Status }>`
width: 8px;
height: 8px;
border-radius: 50%;
background-color: ${({ $status }) => statusColors[$status]};
flex-shrink: 0;
${({ $status }) =>
$status === 'online' &&
`
box-shadow: 0 0 6px #00E676;
animation: pulse 2s infinite;
`}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.5; }
}
`;
export default function StatusBadge({ status }: StatusBadgeProps) {
return (
<BadgeWrapper $status={status}>
<Dot $status={status} />
{statusLabels[status]}
</BadgeWrapper>
);
}