From c2e9bdc6c5e22494d92c2a50938ad1478b15d490 Mon Sep 17 00:00:00 2001
From: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date: Sun, 4 Aug 2024 19:02:45 +1000
Subject: [PATCH] feat(ui): handle new progress event
Minor changes to use the new progress event. Only additional feature is if the progress has a message, it is displayed as a tooltip on the progress bar.
---
.../middleware/devtools/actionSanitizer.ts | 8 +++----
.../middleware/listenerMiddleware/index.ts | 4 ++--
...rogress.ts => socketInvocationProgress.ts} | 12 +++++-----
.../components/IAICanvasIntermediateImage.tsx | 3 +--
.../ImageViewer/CurrentImageButtons.tsx | 2 +-
.../components/ImageViewer/ProgressImage.tsx | 10 ++++----
.../nodes/CurrentImage/CurrentImageNode.tsx | 2 +-
.../system/components/ProgressBar.tsx | 23 +++++++++++--------
.../src/features/system/store/systemSlice.ts | 11 ++++-----
.../web/src/features/system/store/types.ts | 13 ++---------
.../web/src/services/events/actions.ts | 6 ++---
.../src/services/events/setEventListeners.ts | 6 ++---
.../frontend/web/src/services/events/types.ts | 5 ++--
13 files changed, 47 insertions(+), 58 deletions(-)
rename invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/{socketGeneratorProgress.ts => socketInvocationProgress.ts} (65%)
diff --git a/invokeai/frontend/web/src/app/store/middleware/devtools/actionSanitizer.ts b/invokeai/frontend/web/src/app/store/middleware/devtools/actionSanitizer.ts
index f0ea175aec..b6f1d53a2c 100644
--- a/invokeai/frontend/web/src/app/store/middleware/devtools/actionSanitizer.ts
+++ b/invokeai/frontend/web/src/app/store/middleware/devtools/actionSanitizer.ts
@@ -3,7 +3,7 @@ import { deepClone } from 'common/util/deepClone';
import { isAnyGraphBuilt } from 'features/nodes/store/actions';
import { appInfoApi } from 'services/api/endpoints/appInfo';
import type { Graph } from 'services/api/types';
-import { socketGeneratorProgress } from 'services/events/actions';
+import { socketInvocationProgress } from 'services/events/actions';
export const actionSanitizer = (action: A): A => {
if (isAnyGraphBuilt(action)) {
@@ -24,10 +24,10 @@ export const actionSanitizer = (action: A): A => {
};
}
- if (socketGeneratorProgress.match(action)) {
+ if (socketInvocationProgress.match(action)) {
const sanitized = deepClone(action);
- if (sanitized.payload.data.progress_image) {
- sanitized.payload.data.progress_image.dataURL = '