mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(ui): add simple selectIsBusy selector
This commit is contained in:
parent
a0cb18a12c
commit
d8437d3036
@ -1,7 +1,7 @@
|
||||
import { createSelector } from '@reduxjs/toolkit';
|
||||
import { RootState } from 'app/store/store';
|
||||
import { defaultSelectorOptions } from 'app/store/util/defaultMemoizeOptions';
|
||||
import { reduce, pickBy } from 'lodash-es';
|
||||
import { pickBy, reduce } from 'lodash-es';
|
||||
|
||||
export const systemSelector = (state: RootState) => state.system;
|
||||
|
||||
@ -50,3 +50,8 @@ export const languageSelector = createSelector(
|
||||
|
||||
export const isProcessingSelector = (state: RootState) =>
|
||||
state.system.isProcessing;
|
||||
|
||||
export const selectIsBusy = createSelector(
|
||||
(state: RootState) => state,
|
||||
(state) => state.system.isProcessing || !state.system.isConnected
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user