diff --git a/pyproject.toml b/pyproject.toml
index eb7018c..2c9b98d 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,7 +1,7 @@
[project]
name = "promptmanager"
description = "A powerful ComfyUI custom node that extends the standard text encoder with persistent prompt storage, advanced search capabilities, and an automatic image gallery system using SQLite."
-version = "3.0.9"
+version = "3.0.10"
license = {file = "LICENSE"}
dependencies = ["# Core dependencies for PromptManager", "# Note: Most dependencies are already included with ComfyUI", "# Already included with Python standard library:", "# - sqlite3", "# - hashlib", "# - json", "# - datetime", "# - os", "# - typing", "# - threading", "# - uuid", "# Required for gallery functionality:", "watchdog>=2.1.0 # For file system monitoring", "Pillow>=8.0.0 # For image metadata extraction (usually included with ComfyUI)", "# Optional dependencies for enhanced search functionality:", "# fuzzywuzzy[speedup]>=0.18.0 # For fuzzy string matching (optional)", "# sqlalchemy>=1.4.0 # For advanced ORM features (optional)", "# Development dependencies (optional):", "# pytest>=6.0.0 # For running tests", "# black>=22.0.0 # For code formatting", "# flake8>=4.0.0 # For linting", "# mypy>=0.910 # For type checking"]
diff --git a/web/gallery.html b/web/gallery.html
index a77fc2e..a88b239 100644
--- a/web/gallery.html
+++ b/web/gallery.html
@@ -208,7 +208,11 @@
- Page 1
+
+ Page
+
+ of 1
+
@@ -525,6 +529,12 @@
document.getElementById('retryBtn').addEventListener('click', () => this.loadImages());
document.getElementById('prevPageBtn').addEventListener('click', () => this.previousPage());
document.getElementById('nextPageBtn').addEventListener('click', () => this.nextPage());
+ document.getElementById('pageInput').addEventListener('change', (e) => this.goToPage(parseInt(e.target.value)));
+ document.getElementById('pageInput').addEventListener('keypress', (e) => {
+ if (e.key === 'Enter') {
+ this.goToPage(parseInt(e.target.value));
+ }
+ });
// Settings modal event listeners
document.getElementById('closeSettingsBtn').addEventListener('click', () => this.hideSettings());
@@ -2501,7 +2511,11 @@ Seed: ${this.currentMetadata.seed || 'Unknown'}`;
document.getElementById('prevPageBtn').disabled = !hasPrev;
document.getElementById('nextPageBtn').disabled = !hasNext;
- document.getElementById('pageInfo').textContent = `Page ${this.currentPage} of ${totalPages}`;
+ document.getElementById('pageInfo').textContent = `of ${totalPages}`;
+
+ const pageInput = document.getElementById('pageInput');
+ pageInput.value = this.currentPage;
+ pageInput.max = totalPages;
if (totalPages > 1) {
document.getElementById('paginationControls').classList.remove('hidden');
@@ -2524,6 +2538,20 @@ Seed: ${this.currentMetadata.seed || 'Unknown'}`;
this.loadImages();
}
}
+
+ goToPage(page) {
+ const totalPages = Math.ceil(this.total / this.limit);
+ if (isNaN(page) || page < 1 || page > totalPages) {
+ // Reset to current page if invalid input
+ document.getElementById('pageInput').value = this.currentPage;
+ return;
+ }
+
+ if (page !== this.currentPage) {
+ this.currentPage = page;
+ this.loadImages();
+ }
+ }
}
// Initialize gallery when page loads