feat: 완전한 문서 관리 시스템 구현
✨ 주요 기능: - 문서 사라짐 문제 해결: API limit 제한으로 인한 문서 누락 해결 - 서적별 문서 관리: HTML과 PDF 통합 관리 시스템 - PDF 뷰어 개선: 인증, 네비게이션, 에러 처리 강화 - 서적 편집/삭제: 완전한 서적 관리 기능 🔧 기술적 개선: - /api/documents/all 엔드포인트 추가 (모든 문서 조회) - HTML/PDF 문서 타입별 아이콘 및 필터링 - 서적별 뷰에서 편집/삭제 버튼 추가 - PDF Manager와 서적 편집 페이지 연동 🎨 UI/UX 개선: - Devonthink 스타일 서적 그룹화 - HTML 문서 순서 관리와 PDF 관리 섹션 분리 - 문서 타입별 시각적 구분 (HTML: 파란색, PDF: 빨간색) - 2단계 확인을 통한 안전한 서적 삭제 �� 버그 수정: - PDF 삭제 시 undefined ID 전달 문제 해결 - 서적 편집 페이지 422 오류 해결 (URL 파라미터 문제) - PDF.js 워커 설정 및 인증 토큰 처리 개선
This commit is contained in:
@@ -150,7 +150,10 @@
|
||||
<div class="p-6">
|
||||
<div class="flex items-start justify-between mb-4">
|
||||
<h3 class="text-lg font-semibold text-gray-900 line-clamp-2" x-text="doc.title"></h3>
|
||||
<i class="fas fa-file-alt text-blue-500 text-xl"></i>
|
||||
<!-- 문서 타입별 아이콘 -->
|
||||
<i x-show="doc.html_path && !doc.pdf_path" class="fas fa-file-alt text-blue-500 text-xl" title="HTML 문서"></i>
|
||||
<i x-show="doc.pdf_path && !doc.html_path" class="fas fa-file-pdf text-red-500 text-xl" title="PDF 문서"></i>
|
||||
<i x-show="doc.html_path && doc.pdf_path" class="fas fa-file-archive text-purple-500 text-xl" title="HTML + PDF"></i>
|
||||
</div>
|
||||
|
||||
<p class="text-gray-600 text-sm mb-3 line-clamp-3" x-text="doc.description || '설명 없음'"></p>
|
||||
@@ -222,11 +225,22 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 확장/축소 아이콘 -->
|
||||
<!-- 서적 관리 버튼들 -->
|
||||
<div class="flex items-center space-x-2">
|
||||
<button @click.stop="openBookDocuments(bookGroup.book)"
|
||||
class="px-3 py-1 text-xs bg-blue-100 text-blue-700 rounded-full hover:bg-blue-200 transition-colors">
|
||||
편집
|
||||
<!-- 서적 편집 버튼 -->
|
||||
<button x-show="bookGroup.book?.id"
|
||||
@click.stop="window.location.href = `/book-editor.html?id=${bookGroup.book.id}`"
|
||||
class="px-3 py-1 text-xs bg-blue-100 text-blue-700 rounded-md hover:bg-blue-200 transition-colors"
|
||||
title="서적 편집">
|
||||
<i class="fas fa-edit mr-1"></i>편집
|
||||
</button>
|
||||
|
||||
<!-- 서적 삭제 버튼 -->
|
||||
<button x-show="bookGroup.book?.id"
|
||||
@click.stop="deleteBook(bookGroup.book)"
|
||||
class="px-3 py-1 text-xs bg-red-100 text-red-700 rounded-md hover:bg-red-200 transition-colors"
|
||||
title="서적 삭제">
|
||||
<i class="fas fa-trash mr-1"></i>삭제
|
||||
</button>
|
||||
<i class="fas fa-chevron-down text-gray-400 transition-transform duration-200"
|
||||
:class="{'rotate-180': bookGroup.expanded}"></i>
|
||||
@@ -243,8 +257,17 @@
|
||||
<div class="flex items-center space-x-3 flex-1">
|
||||
<!-- 문서 타입 아이콘 -->
|
||||
<div class="w-8 h-8 rounded-md flex items-center justify-center"
|
||||
:class="doc.pdf_path ? 'bg-red-100 text-red-600' : 'bg-gray-100 text-gray-600'">
|
||||
<i :class="doc.pdf_path ? 'fas fa-file-pdf' : 'fas fa-file-alt'" class="text-xs"></i>
|
||||
:class="{
|
||||
'bg-blue-100 text-blue-600': doc.html_path && !doc.pdf_path,
|
||||
'bg-red-100 text-red-600': doc.pdf_path && !doc.html_path,
|
||||
'bg-purple-100 text-purple-600': doc.html_path && doc.pdf_path
|
||||
}">
|
||||
<i class="text-xs"
|
||||
:class="{
|
||||
'fas fa-file-alt': doc.html_path && !doc.pdf_path,
|
||||
'fas fa-file-pdf': doc.pdf_path && !doc.html_path,
|
||||
'fas fa-file-archive': doc.html_path && doc.pdf_path
|
||||
}"></i>
|
||||
</div>
|
||||
|
||||
<!-- 문서 정보 -->
|
||||
|
||||
Reference in New Issue
Block a user