Commit Graph

695 Commits

Author SHA1 Message Date
6298df14e7 Hide only the filtered-out button in a row, not the entire row 2023-03-15 21:20:56 +05:30
2d0a76c5a4 remove task from dome when removing images
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.
2023-03-15 11:13:26 -04:00
b7a7a7d31f Move similar image info buttons into a single row, using the new array API 2023-03-15 19:41:19 +05:30
841811e3bc Full screen button on images; Changelog 2023-03-15 19:25:55 +05:30
0679fb2b20 Merge pull request #1017 from ogmaresca/image-modal
Add image modal functionality
2023-03-15 18:45:17 +05:30
c8f8f329e3 Allow creating custom HTML elements for image info button plugins (#1007)
* Allow creating custom HTML elements for image info button plugins

* Allow arrays and labels

* Add spacing between buttons on the same row
2023-03-15 18:44:43 +05:30
ab7d74d2fa Add a image modal function 2023-03-14 21:43:49 -04:00
c9ddf4d15f Fix #1012 - Image Modifiers > Thumbnail Size slider remembers its position but does not apply it at page load 2023-03-14 19:02:34 +01:00
24b631500a Merge pull request #1009 from JeLuF/BigX
Only delete task sections if they are no longer processing
2023-03-14 21:57:59 +05:30
0ddcc98a57 Merge pull request #1004 from JeLuF/toosmall
Warn users about small image dimensions
2023-03-14 10:42:13 +05:30
9ca8cf810b Merge pull request #1003 from patriceac/patch-50
Notify plugins when image tags get refreshed
2023-03-14 10:41:12 +05:30
3c2157111b Download all: Add Metadata download (#923)
* 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
2023-03-14 10:40:24 +05:30
d26e646a94 Refresh the image count as user types (#936)
* 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.
2023-03-14 10:37:55 +05:30
1fda12640f Custom Image Modifiers dialog tweaks (#935)
* 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
2023-03-14 10:37:21 +05:30
079402cb2f Fix restoration of weighted tasks with truncated modifiers (#956)
* 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
2023-03-14 10:36:21 +05:30
c52b72f500 Merge pull request #991 from JeLuF/modi
Fix autosave of modifiers image style
2023-03-14 10:35:34 +05:30
2916a33fa2 Only delete task sections if they are no longer processing 2023-03-13 23:05:11 +01:00
03256f6bba Warn users about small image dimensions
Show a warning if the user chooses width & height < 512px
2023-03-12 20:43:54 +01:00
257b14ee09 Notify plugins when image tags get refreshed
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).
2023-03-12 01:23:05 -08:00
bb0f7cd1cd Load mask from file 2023-03-11 12:37:51 +05:30
3b708e8d44 Fix autosave of modifiers image style 2023-03-10 21:23:16 +01:00
f2a960136e Move zoom and 'scroll to generated image' into a flat icon strip, with a press-toggle button for the 'scroll to' button; Tweaked the behavior of the on-scroll dropdown CSS class 2023-03-01 18:27:48 +05:30
7a1170f1dd Use naturalWidth, to show the actual image width (especially for upscaled images) 2023-03-01 15:22:38 +05:30
24cce08580 Show the image dimensions on mouse over 2023-03-01 15:17:27 +05:30
353fe88226 Set tertiary colors on buttons that don't need to be visible in a very dominant manner 2023-02-28 15:37:38 +05:30
1a3086230e Set the dropdown width only when the dropdown is opened, to fix a bug where it would get set before the DOM element actually rendered. The settings field is collapsed by default (on new installations), so the computed DOM width would be invalid 2023-02-28 15:37:06 +05:30
0e57487774 Preserve full names for shortened modifiers (#945)
* 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.
2023-02-28 14:42:24 +05:30
3024465086 Merge pull request #932 from patriceac/patch-42
DOM tweaking to identify modifier categories
2023-02-28 14:41:46 +05:30
c95b43253a Merge pull request #933 from patriceac/patch-43
Cleanup logging
2023-02-28 14:41:04 +05:30
d83e034d5e Select model by clicking on the file icon itself
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.
2023-02-26 17:26:22 -08:00
b9676b51cb Cleanup logging
Is it okay for you if I comment this in Beta?
2023-02-24 17:46:53 -08:00
5698473891 Renaming custom-modifier-category to modifier-category 2023-02-24 13:55:18 -08:00
bd82480fa3 Keep the min-width of a dropdown equal to the width of the input element 2023-02-24 20:08:19 +05:30
fce8b96d3b Tweaks to the styling of the models dropdown 2023-02-24 19:29:25 +05:30
37b47e7f05 Show root-level models at the top 2023-02-24 18:55:57 +05:30
a6f94959fe DOM tweaking to identify custom categories
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.
2023-02-24 01:16:14 -08:00
45a2c9f7ef Show icons next to the model folder and files in the dropdown, styling tweaks to increase padding 2023-02-23 22:11:53 +05:30
c49ac6880d Merge pull request #931 from patriceac/patch-41
Fix the restoration of the inpainting toggle
2023-02-23 19:29:40 +05:30
e3ff6f183b Merge pull request #928 from ogmaresca/fix-models-up-down-arrow-keys
Fix up/down arrow keys on model selects
2023-02-23 19:28:16 +05:30
e6ec7393c6 Fix the restoration of the inpainting toggle
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.
2023-02-22 23:46:07 -08:00
1379dde1a7 Fix up/down arrow keys on model selects 2023-02-22 18:18:06 -05:00
79eee62d42 fix for thumbnail slider 2023-02-22 22:05:16 +01:00
30dbadb2ab Focus the prompt textbox on start 2023-02-22 20:11:19 +05:30
6e6d236819 Change the image zoom size if the textbox is edited next to the slider 2023-02-22 19:56:45 +05:30
1023f5f7cc Slider for preview image size (#767)
* Slider for preview image size
Add a slider to the system settings so that users can configure the max size of thumbnails

* Remove debug output

* Fix var definition

* Move slider to 'display settings' menu

* thumbnail slider CSS
2023-02-22 19:32:00 +05:30
4bc7bca60d Merge pull request #924 from patriceac/patch-37
Allow modifier images to be passed as base64 images
2023-02-22 19:28:47 +05:30
14118f142c Update image-modifiers.js
Reloading of image tags with ((weight modifiers)) doesn't reuse the modifier card even if it exists, which means images are not restored either. This change fixes that behavior by ensuring proper matching of the tags with existing modifiers.
2023-02-22 00:57:03 -08:00
9b99be4c1d Allow modifiers to be passed as base64 images
No change in existing UI behavior, this change allows image modifier plugins to (optionally) pass the card image as a base64-encoded image rather than a source file.
2023-02-22 00:06:07 -08:00
7b85e50604 Merge pull request #918 from JeLuF/downloadall
Download all: Fix to download more than 10 images
2023-02-21 08:41:50 +05:30
75f758e792 Bugfix for enforce autosave (#909)
* show saveToDisk as checked and enable metadata format selection

* spaces instead of tabs

* check if force = true
2023-02-21 08:39:16 +05:30