feat(ui): add warning socket event handling

This commit is contained in:
psychedelicious
2023-06-13 20:51:35 +10:00
parent abee37eab3
commit 09f396ce84
8 changed files with 80 additions and 0 deletions

View File

@ -23,6 +23,7 @@ import {
appSocketInvocationComplete,
appSocketInvocationError,
appSocketInvocationStarted,
appSocketInvocationWarning,
appSocketSubscribed,
appSocketUnsubscribed,
} from 'services/events/actions';
@ -334,6 +335,20 @@ export const systemSlice = createSlice({
);
});
/**
* Invocation Warning
*/
builder.addCase(appSocketInvocationWarning, (state, action) => {
const { data } = action.payload;
state.toastQueue.push(
makeToast({
title: t('toast.serverWarning'),
description: data.warning,
status: 'warning',
})
);
});
/**
* Graph Execution State Complete
*/