File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 150150 < button id ="btn-save-bookmark-set " class ="icon-btn " title ="Save as Bookmark Set "> 📦</ button >
151151 < button id ="btn-load-bookmark-set " class ="icon-btn " title ="Load Bookmark Set "> 📥</ button >
152152 < button id ="btn-export-bookmarks " class ="icon-btn " title ="Export Bookmarks "> 💾</ button >
153+ < button id ="btn-clear-bookmarks " class ="section-btn " title ="Clear all bookmarks "> 🗑</ button >
153154 </ div >
154155 < div id ="bookmark-sets-bar " class ="bookmark-sets-bar hidden ">
155156 < div id ="bookmark-sets-list " class ="bookmark-sets-list "> </ div >
168169 < button id ="btn-delete-highlight-group " class ="highlight-group-btn danger " title ="Delete active group " style ="display:none "> Del</ button >
169170 </ div >
170171 </ div >
172+ < div class ="section-header-inline " style ="padding:4px 8px 0; ">
173+ < button id ="btn-clear-highlights " class ="section-btn " title ="Clear active highlights (saved groups are kept) "> 🗑 Clear</ button >
174+ </ div >
171175 < div id ="highlights-list " class ="highlights-content ">
172176 < p class ="placeholder "> No highlight rules</ p >
173177 </ div >
Original file line number Diff line number Diff line change @@ -13731,6 +13731,16 @@ function init(): void {
1373113731
1373213732 // Highlights
1373313733 elements.btnAddHighlight.addEventListener('click', showHighlightModal);
13734+ document.getElementById('btn-clear-highlights')?.addEventListener('click', async () => {
13735+ if (state.highlights.length === 0) return;
13736+ await window.api.clearAllHighlights();
13737+ state.highlights = [];
13738+ activeHighlightGroupId = null;
13739+ updateHighlightGroupsUI();
13740+ updateHighlightsUI();
13741+ renderVisibleLines();
13742+ renderMinimapMarkers();
13743+ });
1373413744 elements.btnSaveHighlight.addEventListener('click', saveHighlight);
1373513745 elements.btnCancelHighlight.addEventListener('click', hideHighlightModal);
1373613746
@@ -13851,6 +13861,14 @@ function init(): void {
1385113861 // Bookmark Sets
1385213862 elements.btnSaveBookmarkSet.addEventListener('click', saveBookmarkSet);
1385313863 elements.btnLoadBookmarkSet.addEventListener('click', refreshBookmarkSets);
13864+ document.getElementById('btn-clear-bookmarks')?.addEventListener('click', async () => {
13865+ if (state.bookmarks.length === 0) return;
13866+ await window.api.clearBookmarks();
13867+ state.bookmarks = [];
13868+ updateBookmarksUI();
13869+ renderVisibleLines();
13870+ renderMinimapMarkers();
13871+ });
1385413872
1385513873 // Notes modal
1385613874 elements.btnSaveNotes.addEventListener('click', () => hideNotesModal(true));
You can’t perform that action at this time.
0 commit comments