implement post metadata import and views. implemented series paging and reader view.

This commit is contained in:
Bryan Van Deusen
2026-01-22 22:19:11 -05:00
parent f41acb40f6
commit a05aee5a07
16 changed files with 2298 additions and 8 deletions
+42
View File
@@ -112,6 +112,7 @@
updateCount();
loadCommonTags();
dispatchSelectionChanged();
}
function clearSelection() {
@@ -121,6 +122,7 @@
});
updateCount();
updateCommonTagsDisplay();
dispatchSelectionChanged();
}
function updateCount() {
@@ -129,6 +131,39 @@
}
}
function dispatchSelectionChanged() {
document.dispatchEvent(new CustomEvent('selectionChanged', {
detail: { count: state.selectedIds.size }
}));
}
// Enable select mode programmatically, optionally without opening the bulk panel
function enableSelectMode(skipPanel = false) {
if (state.isSelectMode) return;
state.isSelectMode = true;
document.body.classList.add('select-mode');
dom.selectBtn.textContent = 'Cancel';
dom.selectBtn.classList.add('active');
if (!skipPanel) {
dom.panel.classList.add('active');
updateCommonTagsDisplay();
}
}
// Disable select mode
function disableSelectMode() {
if (!state.isSelectMode) return;
state.isSelectMode = false;
document.body.classList.remove('select-mode');
dom.selectBtn.textContent = 'Select';
dom.selectBtn.classList.remove('active');
dom.panel.classList.remove('active');
clearSelection();
}
function updateSelectionUI() {
// Re-apply selected class to any newly loaded images that are in selection
document.querySelectorAll('.img-clickable').forEach(item => {
@@ -416,6 +451,7 @@
archive: '🗜️',
character: '👤',
series: '📺',
fandom: '🎭',
rating: '⚠️',
source: '🌐',
post: '📌'
@@ -435,4 +471,10 @@
} else {
init();
}
// Expose global API for other scripts (like series editor)
window.selectedImages = state.selectedIds;
window.clearSelection = clearSelection;
window.enableSelectMode = enableSelectMode;
window.disableSelectMode = disableSelectMode;
})();