Sprint 003 non-blocking 처리:
- API Key Guard (passport-http-bearer) + AuthModule
- Helmet 적용 (main.ts)
- SisterNamePipe - name 파라미터 Controller 검증
- lib/sisters.ts - formatLastSeen/sisterEmojis/sisterDisplayNames 공통 추출
Sprint 004 본문:
- TASK-012: POST /api/admin/sisters/:name/{restart,reset} (ApiKeyGuard 적용)
- TASK-013: GET/PUT /api/admin/harness/:name/:file (허용 파일 allowlist)
- TASK-015: GET /api/admin/logs/:name
- 관리자 전 API @UseGuards(ApiKeyGuard)
- TASK-014: /admin 자매 관리 (재시작/리셋 + ConfirmModal)
- TASK-014: /admin/harness 하네스 편집 (CodeEditor + 파일트리)
- TASK-015: /admin/logs 로그 뷰어 (LogTerminal + 검색/에러필터)
- /admin/repos 저장소 목록
- AdminLayout (API Key 로컬스토리지 저장)
- 테스트 22/22 pass, FE 11 routes build 성공
45 lines
936 B
TypeScript
45 lines
936 B
TypeScript
'use client';
|
|
|
|
import React from 'react';
|
|
import styled from 'styled-components';
|
|
|
|
const Textarea = styled.textarea`
|
|
width: 100%;
|
|
min-height: 400px;
|
|
background: #0a0e14;
|
|
border: 1px solid #1e2430;
|
|
border-radius: 8px;
|
|
color: #a8c4e0;
|
|
font-family: 'Fira Code', 'Cascadia Code', 'JetBrains Mono', monospace;
|
|
font-size: 13px;
|
|
line-height: 1.6;
|
|
padding: 16px;
|
|
resize: vertical;
|
|
outline: none;
|
|
tab-size: 2;
|
|
|
|
&:focus {
|
|
border-color: #58A6FF;
|
|
}
|
|
|
|
&::-webkit-scrollbar { width: 4px; }
|
|
&::-webkit-scrollbar-thumb { background: #1e2430; border-radius: 2px; }
|
|
`;
|
|
|
|
interface CodeEditorProps {
|
|
value: string;
|
|
onChange: (v: string) => void;
|
|
readOnly?: boolean;
|
|
}
|
|
|
|
export default function CodeEditor({ value, onChange, readOnly }: CodeEditorProps) {
|
|
return (
|
|
<Textarea
|
|
value={value}
|
|
onChange={(e) => onChange(e.target.value)}
|
|
readOnly={readOnly}
|
|
spellCheck={false}
|
|
/>
|
|
);
|
|
}
|