This commit introduces a new gallery feature that allows you to mark images
in your user data folder and view them in a dedicated gallery page.
Key changes:
Backend (`app/user_manager.py`):
- Added a `GALLERY_SUFFIX` constant (`.gallery`).
- Implemented `toggle_gallery_status` to add/remove the gallery suffix from
filenames (e.g., `image.png` <-> `image.gallery.png`).
- Added a POST route `/userdata/{file}/gallery` to toggle an image's gallery
status.
- Implemented `list_gallery_files` to retrieve all images marked for the
gallery.
- Added a GET route `/gallery` to list gallery items for you.
Frontend:
- Created `web/gallery.html` as the main page for the gallery view.
- Created `web/css/gallery.css` for basic styling of the gallery.
- Created `web/scripts/gallery.js` to fetch and display gallery items,
allowing you to remove items from the gallery.
- Created `web/scripts/gallery_integration.js` to dynamically add a "Gallery"
button/link to the main application UI, which navigates to `gallery.html`.
- Updated `web/index.html` to include the gallery integration script.
Tests (`tests-unit/app_test/user_manager_gallery_routes_test.py`):
- Added comprehensive unit tests for the new backend routes, covering:
- Listing gallery items (empty, single, multiple, subdirectories).
- Toggling gallery status (add, remove, file not found, invalid params).
- Correct filename transformations and path handling.
* menu
* wip
* wip
* wip
* wip
* wip
* workflow saving/loading
* Support inserting workflows
Move buttosn to top of lists
* fix session storage
implement renaming
* temp
* refactor, better workflow instance management
* wip
* progress on progress
* added send to workflow
various fixes
* Support multiple image loaders
* Support dynamic size breakpoints based on content
* various fixes
add close unsaved warning
* Add filtering tree
* prevent renaming unsaved
* fix zindex on hover
* fix top offset
* use filename as workflow name
* resize on setting change
* hide element until it is drawn
* remove glow
* Fix export name
* Fix test, revert accidental changes to groupNode
* Fix colors on all themes
* show hover items on smaller screen (mobile)
* remove debugging code
* dialog fix
* Dont reorder open workflows
Allow elements around canvas
* Toggle body display on setting change
* Fix menu disappearing on chrome
* Increase delay when typing, remove margin on Safari, fix dialog location
* Fix overflow issue on iOS
* Add reset view button
Prevent view changes causing history entries
* Bottom menu wip
* Various fixes
* Fix merge
* Fix breaking old menu position
* Fix merge adding restore view to loadGraphData
* wip per user data
* Rename, hide menu
* better error
rework default user
* store pretty
* Add userdata endpoints
Change nodetemplates to userdata
* add multi user message
* make normal arg
* Fix tests
* Ignore user dir
* user tests
* Changed to default to browser storage and add server-storage arg
* fix crash on empty templates
* fix settings added before load
* ignore parse errors
This enables local reverse-proxies to host ComfyUI on a path, eg "http://example.com/ComfyUI/" in such a way that at least everything I tested works. Without this patch, proxying ComfyUI in this way will yield errors.