🐛 Fix Alpine.js SyntaxError and backlink visibility issues

- Fix SyntaxError in viewer.js line 2868 (.bind(this) issue in setTimeout)
- Resolve Alpine.js 'Can't find variable' errors (documentViewer, goBack, etc.)
- Fix backlink rendering and persistence during temporary highlights
- Add backlink protection and restoration mechanism in highlightAndScrollToText
- Implement Note Management System with hierarchical notebooks
- Add note highlights and memos functionality
- Update cache version to force browser refresh (v=2025012641)
- Add comprehensive logging for debugging backlink issues
This commit is contained in:
Hyungi Ahn
2025-08-26 23:50:48 +09:00
parent 8d7f4c04bb
commit 3e0a03f149
31 changed files with 5176 additions and 567 deletions

View File

@@ -125,7 +125,18 @@ window.documentApp = () => ({
this.error = '';
try {
this.documents = await window.api.getDocuments();
const allDocuments = await window.api.getDocuments();
// HTML 문서만 필터링 (PDF 파일 제외)
this.documents = allDocuments.filter(doc =>
doc.html_path &&
doc.html_path.includes('/documents/') // HTML은 documents 폴더에 저장됨
);
console.log('📄 전체 문서:', allDocuments.length, '개');
console.log('📄 HTML 문서:', this.documents.length, '개');
console.log('📄 PDF 파일:', allDocuments.length - this.documents.length, '개 (제외됨)');
this.updateAvailableTags();
this.filterDocuments();
this.syncUIState(); // UI 상태 동기화