Merge branch 'main' into release/make-web-dist-startable

This commit is contained in:
psychedelicious 2023-05-26 18:04:09 +10:00 committed by GitHub
commit e1c85f1234
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View File

@ -8,6 +8,7 @@ import {
} from 'services/thunks/image';
import { sessionCanceled } from 'services/thunks/session';
import { isImageOutput } from 'services/types/guards';
import { progressImageSet } from 'features/system/store/systemSlice';
const moduleLog = log.child({ namespace: 'socketio' });
const nodeDenylist = ['dataURL_image'];
@ -37,12 +38,6 @@ export const addInvocationCompleteListener = () => {
if (isImageOutput(result) && !nodeDenylist.includes(node.type)) {
const { image_name, image_type } = result.image;
// Get its URLS
// TODO: is this extraneous? I think so...
dispatch(
imageUrlsReceived({ imageName: image_name, imageType: image_type })
);
// Get its metadata
dispatch(
imageMetadataReceived({
@ -65,6 +60,8 @@ export const addInvocationCompleteListener = () => {
);
dispatch(addImageToStagingArea(image));
}
dispatch(progressImageSet(null));
}
},
});

View File

@ -215,6 +215,9 @@ export const systemSlice = createSlice({
languageChanged: (state, action: PayloadAction<keyof typeof LANGUAGES>) => {
state.language = action.payload;
},
progressImageSet(state, action: PayloadAction<ProgressImage | null>) {
state.progressImage = action.payload;
},
},
extraReducers(builder) {
/**
@ -305,7 +308,6 @@ export const systemSlice = createSlice({
state.currentStep = 0;
state.totalSteps = 0;
state.statusTranslationKey = 'common.statusProcessingComplete';
state.progressImage = null;
if (state.canceledSession === data.graph_execution_state_id) {
state.isProcessing = false;
@ -438,6 +440,7 @@ export const {
isPersistedChanged,
shouldAntialiasProgressImageChanged,
languageChanged,
progressImageSet,
} = systemSlice.actions;
export default systemSlice.reducer;