🐛 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

@@ -8,8 +8,8 @@
<h1 class="text-xl font-bold text-gray-900">Document Server</h1>
</div>
<!-- 메인 네비게이션 - 2가지 기능 -->
<nav class="flex space-x-8">
<!-- 메인 네비게이션 - 3가지 기능 -->
<nav class="flex space-x-6">
<!-- 문서 관리 시스템 -->
<div class="relative" x-data="{ open: false }" @mouseenter="open = true" @mouseleave="open = false">
<a href="index.html" class="nav-link" id="doc-nav-link">
@@ -27,11 +27,11 @@
</div>
</div>
<!-- 메모장 시스템 -->
<!-- 소설 관리 시스템 -->
<div class="relative" x-data="{ open: false }" @mouseenter="open = true" @mouseleave="open = false">
<a href="memo-tree.html" class="nav-link" id="memo-nav-link">
<i class="fas fa-sitemap"></i>
<span>메모장</span>
<a href="memo-tree.html" class="nav-link" id="novel-nav-link">
<i class="fas fa-feather-alt"></i>
<span>소설 관리</span>
<i class="fas fa-chevron-down text-xs ml-1"></i>
</a>
<div x-show="open" x-transition class="nav-dropdown">
@@ -43,6 +43,26 @@
</a>
</div>
</div>
<!-- 노트 관리 시스템 -->
<div class="relative" x-data="{ open: false }" @mouseenter="open = true" @mouseleave="open = false">
<a href="notes.html" class="nav-link" id="notes-nav-link">
<i class="fas fa-sticky-note"></i>
<span>노트 관리</span>
<i class="fas fa-chevron-down text-xs ml-1"></i>
</a>
<div x-show="open" x-transition class="nav-dropdown">
<a href="notebooks.html" class="nav-dropdown-item" id="notebooks-nav-item">
<i class="fas fa-book mr-2 text-blue-500"></i>노트북 관리
</a>
<a href="notes.html" class="nav-dropdown-item" id="notes-list-nav-item">
<i class="fas fa-list mr-2 text-green-500"></i>노트 목록
</a>
<a href="note-editor.html" class="nav-dropdown-item" id="note-editor-nav-item">
<i class="fas fa-edit mr-2 text-purple-500"></i>새 노트 작성
</a>
</div>
</div>
</nav>
<!-- 사용자 메뉴 -->
@@ -114,12 +134,17 @@
isDocumentPage() {
const page = this.getCurrentPage();
return ['index', 'hierarchy'].includes(page);
return ['index', 'hierarchy', 'pdf-manager'].includes(page);
},
isMemoPage() {
isNovelPage() {
const page = this.getCurrentPage();
return ['memo-tree', 'story-view'].includes(page);
return ['memo-tree', 'story-view', 'story-reader'].includes(page);
},
isNotePage() {
const page = this.getCurrentPage();
return ['notes', 'note-editor'].includes(page);
}
};
@@ -129,7 +154,8 @@
Alpine.store('header', {
getCurrentPage: () => headerUtils.getCurrentPage(),
isDocumentPage: () => headerUtils.isDocumentPage(),
isMemoPage: () => headerUtils.isMemoPage(),
isNovelPage: () => headerUtils.isNovelPage(),
isNotePage: () => headerUtils.isNotePage(),
});
} else {
// Alpine 로드 대기
@@ -137,7 +163,8 @@
Alpine.store('header', {
getCurrentPage: () => headerUtils.getCurrentPage(),
isDocumentPage: () => headerUtils.isDocumentPage(),
isMemoPage: () => headerUtils.isMemoPage(),
isNovelPage: () => headerUtils.isNovelPage(),
isNotePage: () => headerUtils.isNotePage(),
});
});
}