Changing the functionality to remove task from dom when all images have been removed. This will save system memory in the browser allowing better performance.
* Download all: Add Metadata download
* Harmonise capitalisation
* Add JSzip, download popup
* 'Save all' popup
- add ZIP download with JSON and folder support
- Popup to prevent accidental trigger of an image download
- Use FileSaver polyfill for better browser support
* remove debug output
* Make DownloadImages a tertiary button
* Refresh the image count as user types
Currently I have to change the focus for the image count to refresh. This change makes it immediate. I've been wondering if 'change' should merely be replaced by 'keyup' but decided against it for accessibility reasons (people who might be using accessibility tools with alternative input methods).
* Add a debounce
Setting a debounce of 300ms on keyup.
* Custom Image Modifiers dialog tweaks
Couple minor usability improvements for the custom image modifiers dialog:
- set the focus to the textbox when opening the dialog
- pressing the Escape key closes the dialog
* Adding keyboard shortcuts
Escape to cancel the changes, Ctrl+Enter to confirm the changes. No change to the existing UI behavior using the mouse.
* Make the overlay focusable
Allows the keyboard shortcuts to work if user clicks on the main window rather than the textbox itself.
* Disable spell and grammar correction
* Fix restoration of weighted tasks with truncated modifiers
* Reverting this change
Will create a separate PR for this as needed. Doesn't impact the other bug fix.
* Update utils.js
Image modifiers may be temporarily hidden by plugins like searchable modifier search box, and when restoring a task (e.g. use settings) the image modifier s copied with the hidden class set, which makes it look like it's missing.
By notifying plugins that the image tags have been refreshed, it allows it to act accordingly (in this case by making sure image tags are visible).
* Preserve full names for shortened modifiers
The PR https://github.com/cmdr2/stable-diffusion-ui/pull/779/files added code to preserve the full names of truncated image modifiers, but only in the "short image modifiers" code path. This PR fixes that by preserving the full car name for truncated modifier names too.
* Pick the full modifier name
The previous code selected the entire innerText from the modifier-car-label element, but for truncated modifiers this would also include the tooltip text. This modification fixes that by only picking specifically the full modifier name.
* Only pick the full modifier name
Previous code would pick up the tooltip text too, causing a mismatch of strings in the comparison.
* Display the truncated image modifier names
What we process and compare is always the full image modifier string, but we still want to display a shortened string when applicable.
Currently one has to click on the model name to select a model. Clicking on the file icon won't work and doesn't do anything. This change fixes that behavior by allowing the user to click on either the model name or the file icon to select a model.
This is purely a DOM update to be able to identify the custom category a given custom image modifier is part of, e.g. using .closest() from a custom modifier plugin. No UI change.
The Inpainting toggle doesn't get restored at the very first attempt.
Repro steps:
1. Create a task with a source image and enable the inpainting toggle.
2. Copy the task to the clipboard
3. Refresh the page (F5)
4. Paste the task from the clipboard
Expected result:
The task gets restored and the toggle is ON.
Actual result:
The task is restored, but the toggle is OFF.
To fix that, we have to restore the toggle's state after loading the source image.