- Modified loadAvailableBooks() to include source document's book
- Removed source book exclusion logic that was hiding current book
- Now displays all available books instead of just 'other books'
- Improves user experience by allowing links within same book
Changes:
- viewer-core.js: Removed bookMap.delete(sourceBookInfo.id) logic
- Updated console logs to reflect 'all books' instead of 'other books'
Result: All books now appear in the book selection dropdown
- Fixed CachedAPI endpoint routing: /documents/{id}/links was incorrectly routed to getDocument()
- Added proper pattern matching for document API calls using regex
- Fixed link and backlink API calls to use correct getDocumentLinks() and getDocumentBacklinks() methods
- Added comprehensive debugging logs for API response tracking
- Resolved issue where links were not rendering in document viewer
Changes:
- cached-api.js: Fixed endpoint routing with proper regex pattern matching
- link-manager.js: Enhanced debugging and API response handling
- viewer-core.js: Added closeAllModals() to prevent modal auto-opening
Result: Document links and backlinks now render correctly (8 links restored)
- 링크 생성 기능 완전 복구
- createDocumentLink 함수를 Alpine.js 데이터 객체 내로 이동
- API 필드명 불일치 수정 (source_text → selected_text 등)
- 필수 필드 검증 및 상세 에러 로깅 추가
- API 엔드포인트 수정
- 백엔드와 일치하도록 /documents/{id}/links, /documents/{id}/backlinks 사용
- 올바른 매개변수 전달 방식 적용
- 링크/백링크 렌더링 안정화
- forEach 오류 방지를 위한 배열 타입 검증
- 데이터 없을 시 기존 링크 유지 로직
- 안전한 초기화 및 에러 처리
- UI 단순화
- 같은 서적/다른 서적 구분 제거
- 서적 선택 → 문서 선택 단순한 2단계 프로세스
- 백링크는 자동 생성되도록 수정
- 디버깅 로그 대폭 강화
- API 호출, 응답, 렌더링 각 단계별 상세 로깅
- 데이터 타입 및 개수 추적
주요 수정사항:
- 하이라이트 생성 시 color → highlight_color 필드명 수정으로 색상 전달 문제 해결
- 분홍색을 더 연하게 변경하여 글씨 가독성 향상
- 다중 하이라이트 렌더링을 위아래 균등 분할로 개선
- CSS highlight-span 클래스 추가 및 색상 적용 강화
- 하이라이트 생성/렌더링 과정에 상세한 디버깅 로그 추가
UI 개선:
- 단일 하이라이트: 선택한 색상으로 정확히 표시
- 다중 하이라이트: 위아래로 균등하게 색상 분할 표시
- 메모 입력 모달에서 선택된 텍스트 표시 개선
버그 수정:
- 프론트엔드-백엔드 API 스키마 불일치 해결
- CSS 스타일 우선순위 문제 해결
- 하이라이트 색상이 노랑색으로만 표시되던 문제 해결