From 687da5b64a7ab0b06ae48fa2e0ea863c2f9244d4 Mon Sep 17 00:00:00 2001
From: patriceac <48073125+patriceac@users.noreply.github.com>
Date: Thu, 6 Apr 2023 03:12:48 -0700
Subject: [PATCH] Undo UI cleanup (#1106)
* Moving to InvokeAI attention weighting syntax
* Fix restoration of disabled image tags
Fix the restoration inactive image tags.
* Undo feature UX cleanup
Just show the undo button when there's no task for a more consistent UI.
* cleanup code
* Revert "cleanup code"
This reverts commit 03199c5a4f9bf7dd798645a280735ff0f9f6a17a.
* Update image-modifiers.js
* Update image-modifiers.js
---
ui/index.html | 12 ++++++------
ui/media/css/main.css | 4 ++++
ui/media/js/main.js | 6 ++++--
3 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/ui/index.html b/ui/index.html
index fed2b3b9..702a4c1c 100644
--- a/ui/index.html
+++ b/ui/index.html
@@ -293,6 +293,12 @@
+
+ Type a prompt and press the "Make Image" button.
You can set an "Initial Image" if you want to guide the AI.
+ You can also add modifiers like "Realistic", "Pencil Sketch", "ArtStation" etc by browsing through the "Image Modifiers" section
+ and selecting the desired modifiers.
+ Click "Image Settings" for additional settings like seed, image size, number of images to generate etc.
Enjoy! :)
+
-
- Type a prompt and press the "Make Image" button.
You can set an "Initial Image" if you want to guide the AI.
- You can also add modifiers like "Realistic", "Pencil Sketch", "ArtStation" etc by browsing through the "Image Modifiers" section
- and selecting the desired modifiers.
- Click "Image Settings" for additional settings like seed, image size, number of images to generate etc.
Enjoy! :)
-
diff --git a/ui/media/css/main.css b/ui/media/css/main.css
index e6a95cda..08dea664 100644
--- a/ui/media/css/main.css
+++ b/ui/media/css/main.css
@@ -238,6 +238,10 @@ code {
#stopImage:hover {
background: rgb(177, 27, 0);
}
+#undo {
+ float: right;
+ margin-left: 5px;
+}
div#render-buttons {
gap: 3px;
diff --git a/ui/media/js/main.js b/ui/media/js/main.js
index b22da732..0720b988 100644
--- a/ui/media/js/main.js
+++ b/ui/media/js/main.js
@@ -1310,13 +1310,15 @@ async function stopAllTasks() {
function updateInitialText() {
if (document.querySelector('.imageTaskContainer') === null) {
- if (undoBuffer.length == 0) {
- previewTools.classList.add('displayNone')
+ if (undoBuffer.length > 0) {
+ initialText.prepend(undoButton)
}
+ previewTools.classList.add('displayNone')
initialText.classList.remove('displayNone')
} else {
initialText.classList.add('displayNone')
previewTools.classList.remove('displayNone')
+ document.querySelector('div.display-settings').prepend(undoButton)
}
}