mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-01-11 10:25:16 +00:00
Display history in reverse order to make it easier to load last gen.
This commit is contained in:
parent
6962cb46a9
commit
62efc78a4b
@ -431,10 +431,12 @@ class ComfySettingsDialog extends ComfyDialog {
|
|||||||
class ComfyList {
|
class ComfyList {
|
||||||
#type;
|
#type;
|
||||||
#text;
|
#text;
|
||||||
|
#reverse;
|
||||||
|
|
||||||
constructor(text, type) {
|
constructor(text, type, reverse) {
|
||||||
this.#text = text;
|
this.#text = text;
|
||||||
this.#type = type || text.toLowerCase();
|
this.#type = type || text.toLowerCase();
|
||||||
|
this.#reverse = reverse || false;
|
||||||
this.element = $el("div.comfy-list");
|
this.element = $el("div.comfy-list");
|
||||||
this.element.style.display = "none";
|
this.element.style.display = "none";
|
||||||
}
|
}
|
||||||
@ -451,7 +453,7 @@ class ComfyList {
|
|||||||
textContent: section,
|
textContent: section,
|
||||||
}),
|
}),
|
||||||
$el("div.comfy-list-items", [
|
$el("div.comfy-list-items", [
|
||||||
...items[section].map((item) => {
|
...(this.#reverse ? items[section].reverse() : items[section]).map((item) => {
|
||||||
// Allow items to specify a custom remove action (e.g. for interrupt current prompt)
|
// Allow items to specify a custom remove action (e.g. for interrupt current prompt)
|
||||||
const removeAction = item.remove || {
|
const removeAction = item.remove || {
|
||||||
name: "Delete",
|
name: "Delete",
|
||||||
@ -529,7 +531,7 @@ export class ComfyUI {
|
|||||||
this.batchCount = 1;
|
this.batchCount = 1;
|
||||||
this.lastQueueSize = 0;
|
this.lastQueueSize = 0;
|
||||||
this.queue = new ComfyList("Queue");
|
this.queue = new ComfyList("Queue");
|
||||||
this.history = new ComfyList("History");
|
this.history = new ComfyList("History", "history", true);
|
||||||
|
|
||||||
api.addEventListener("status", () => {
|
api.addEventListener("status", () => {
|
||||||
this.queue.update();
|
this.queue.update();
|
||||||
|
Loading…
Reference in New Issue
Block a user