Phase 14.5 구현: 회의 모드 고도화 — 다중 문서 생성/편집/내보내기

PLAUD 수준의 기능 확장:
- 전사 편집: 인라인 편집 + 원본 보존 + 수정됨 표시(점선 밑줄)
- 다중 문서 생성: 회의록/보고서/아이디어노트/커스텀 템플릿
- MD 에디터: 렌더링/편집 토글 (react-markdown + remark-gfm)
- 상세 페이지 리디자인: 풀스크린 탭 전환 구조
- 내보내기: MD, PDF, TXT, DOCX 4종 (docx 패키지)
- 커스텀 프롬프트 템플릿 저장/재사용 (electron-store)
- SSOT: 마크다운 파싱 유틸 추출, 후처리에서 자동 문서 생성 제거

DB: meeting_documents 테이블 + edited_transcript 컬럼
IPC: 8+4 채널, 서비스 2개(MeetingModeService 확장 + MeetingDocTemplateService 신규)
UI: 8개 신규 컴포넌트 (meeting/ 디렉토리), 12개 locale i18n
This commit is contained in:
Yun Chan 2026-04-08 09:53:54 +09:00
parent 6197ceb132
commit d4928ffa60
38 changed files with 4791 additions and 438 deletions

View file

@ -0,0 +1,89 @@
// src/renderer/components/meeting/DocumentTab.tsx
// Phase 14.5: 문서 탭 — MarkdownEditor + 자동저장 + 내보내기
import { useCallback, useRef } from 'react'
import { Box } from '@mui/material'
import DeleteIcon from '@mui/icons-material/Delete'
import { MarkdownEditor } from './MarkdownEditor'
import { ExportMenu } from './ExportMenu'
import { PhysicalButton } from '../ds/PhysicalButton'
import { d3roPalette, d3roTypo } from '../../theme'
import { useI18n } from '../../i18n'
import type { MeetingExportFormat } from '@shared/types'
interface DocumentTabDoc {
id: string
title: string
content: string
templateType: string
}
interface DocumentTabProps {
document: DocumentTabDoc
onContentChange: (content: string) => void
onExport: (format: MeetingExportFormat) => void
onDelete: () => void
}
const AUTOSAVE_DELAY = 500
export function DocumentTab({
document: doc,
onContentChange,
onExport,
onDelete,
}: DocumentTabProps): React.ReactElement {
const { t } = useI18n()
const timerRef = useRef<ReturnType<typeof setTimeout> | null>(null)
const handleChange = useCallback(
(content: string) => {
if (timerRef.current) clearTimeout(timerRef.current)
timerRef.current = setTimeout(() => {
onContentChange(content)
}, AUTOSAVE_DELAY)
},
[onContentChange],
)
return (
<Box
sx={{
display: 'flex',
flexDirection: 'column',
height: '100%',
}}
>
{/* 콘텐츠 편집기 */}
<Box sx={{ flex: 1, overflow: 'hidden', minHeight: 0 }}>
<MarkdownEditor
content={doc.content}
onChange={handleChange}
/>
</Box>
{/* 하단 액션 바 */}
<Box
sx={{
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
mt: 1.5,
pt: 1.5,
borderTop: `1px solid ${d3roPalette.border.subtle}`,
}}
>
<ExportMenu onExport={onExport} />
<PhysicalButton
size="small"
color="error"
onClick={onDelete}
sx={{ height: 32, fontSize: d3roTypo.engrave.size }}
>
<DeleteIcon sx={{ fontSize: 14, mr: 0.5 }} />
{t('common.delete')}
</PhysicalButton>
</Box>
</Box>
)
}