New: Queued Task/Command List View

Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
This commit is contained in:
Qstick
2018-08-30 23:07:50 -04:00
parent 9a1660da51
commit 60bb0ac063
31 changed files with 897 additions and 287 deletions
@@ -1,12 +1,12 @@
import _ from 'lodash';
import { createSelector } from 'reselect';
import { findCommand, isCommandExecuting } from 'Utilities/Command';
import createCommandsSelector from './createCommandsSelector';
function createCommandExecutingSelector(name) {
function createCommandExecutingSelector(name, contraints = {}) {
return createSelector(
createCommandsSelector(),
(commands) => {
return _.some(commands, { name });
return isCommandExecuting(findCommand(commands, { name, ...contraints }));
}
);
}