From 0e95dc3431909172ab16f3e10928e3c8ec9e9f14 Mon Sep 17 00:00:00 2001 From: Vito Date: Wed, 18 Mar 2026 07:09:22 -0700 Subject: [PATCH] fix(ui): enable click-to-close on image viewer (#125) (#129) * fix(ui): enable click-to-close on all image viewers (#125) The admin gallery viewer had backdrop: 'static' which prevented closing by clicking the dark overlay. Changed to backdrop: true and added explicit button: true across all three ViewerJS instances so users can close the viewer by clicking outside or using the close button. * chore: bump version to 3.1.4 --- pyproject.toml | 2 +- web/js/admin.js | 5 ++++- web/js/gallery.js | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 108b8b0..c84f480 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.1.3" +version = "3.1.4" 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/js/admin.js b/web/js/admin.js index f263a1c..85f579b 100644 --- a/web/js/admin.js +++ b/web/js/admin.js @@ -1165,10 +1165,11 @@ flipVertical: 1, }, navbar: true, + button: true, title: true, transition: true, keyboard: true, - backdrop: 'static', + backdrop: true, loading: true, loop: true, tooltip: true, @@ -3629,6 +3630,8 @@ Seed: ${this.currentMetadata.seed || 'Unknown'}`; // Initialize ViewerJS const viewer = new Viewer(container, { inline: false, + button: true, + backdrop: true, navbar: true, toolbar: { zoomIn: 1, diff --git a/web/js/gallery.js b/web/js/gallery.js index 97e24e6..49c927b 100644 --- a/web/js/gallery.js +++ b/web/js/gallery.js @@ -337,6 +337,7 @@ this.viewer = new Viewer(container, { inline: false, button: true, + backdrop: true, navbar: true, title: true, // IMPORTANT: Use original images for viewing, not thumbnails