mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(ui): add warning socket event handling
This commit is contained in:
@ -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
|
||||
*/
|
||||
|
Reference in New Issue
Block a user