updated files
This commit is contained in:
@@ -7,6 +7,5 @@ img/magic_mike.jpg
|
||||
img/workflow_timer.png
|
||||
js/workflow_timer.css
|
||||
js/workflow_timer.js
|
||||
py/__pycache__/workflow_timer.cpython-313.pyc
|
||||
py/workflow_timer.py
|
||||
pyproject.toml
|
||||
@@ -1,3 +1,15 @@
|
||||
#workflow-timer {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #000;
|
||||
overflow: hidden;
|
||||
gap: 5px;
|
||||
}
|
||||
|
||||
.workflow-timer-display {
|
||||
font-size: 50px;
|
||||
font-family: monospace;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { app } from "../../scripts/app.js";
|
||||
import { api } from "../../scripts/api.js";
|
||||
|
||||
const VERSION = "1.0.5"
|
||||
|
||||
const GlobalTimer = {
|
||||
startTime: 0,
|
||||
accumulatedTime: 0, // Track time across pauses
|
||||
@@ -137,10 +139,7 @@ app.registerExtension({
|
||||
this.bgcolor = "#000000";
|
||||
|
||||
const container = document.createElement("div");
|
||||
container.style.cssText = `
|
||||
display: flex; flex-direction: column; align-items: center; justify-content: center;
|
||||
width: 100%; height: 100%; background: #000; overflow: hidden; gap: 5px;
|
||||
`;
|
||||
container.id = "workflow-timer";
|
||||
|
||||
const display = document.createElement("div");
|
||||
display.className = "workflow-timer-display";
|
||||
@@ -184,10 +183,12 @@ app.registerExtension({
|
||||
api.addEventListener("execution_error", () => GlobalTimer.stop('error'));
|
||||
api.addEventListener("execution_interrupted", () => GlobalTimer.stop('error'));
|
||||
|
||||
// MTImageComparePause Integration
|
||||
api.addEventListener("mt.image_compare_preview", () => {
|
||||
GlobalTimer.stop('pause'); // Turn Red on preview pause
|
||||
});
|
||||
// --- Image Compare Integration ---
|
||||
api.addEventListener("mt.image_compare_preview", (event) => {
|
||||
// Check the detail for the isSkipping flag set by image_compare_pause.js
|
||||
if (event.detail && event.detail.isSkipping) return;
|
||||
GlobalTimer.stop('pause'); // Pause (Orange)
|
||||
});
|
||||
|
||||
const originalFetch = window.fetch;
|
||||
window.fetch = function() {
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
[project]
|
||||
name = "ComfyUI_Workflow_Timer"
|
||||
description = "A simple workflow timer node for ComfyUI."
|
||||
version = "1.0.3"
|
||||
version = "1.0.4"
|
||||
license = {file = "LICENSE"}
|
||||
|
||||
[project.urls]
|
||||
|
||||
Reference in New Issue
Block a user