feat(backend-github): Open Authoring (#2430)
* Make filterPromises resolve entries before filtering * Add filterPromisesWith & onlySuccessfulPromises to utility library * Memoize user method in GitHub API * Make storeMetadata safe to call concurrently in GitHub API * Fork workflow: startup and authentication * Fork workflow: backend support * Fork workflow: disable unused UI elements * Fork workflow: docs * Fork workflow: fix deploy previews * Suggested edits for fork workflow doc * Change future tense to present * Fork workflow: add beta status to docs * remove debug statement * rename fork workflow to Open Authoring
This commit is contained in:
committed by
Shawn Erquhart
parent
41559256d0
commit
edf0a3afdc
@ -1,13 +1,16 @@
|
||||
import { Map } from 'immutable';
|
||||
import { USE_FORK_WORKFLOW } from 'Actions/auth';
|
||||
/*
|
||||
* Reducer for some global UI state that we want to share between components
|
||||
* */
|
||||
const globalUI = (state = Map({ isFetching: false }), action) => {
|
||||
const globalUI = (state = Map({ isFetching: false, useForkWorkflow: false }), action) => {
|
||||
// Generic, global loading indicator
|
||||
if (action.type.indexOf('REQUEST') > -1) {
|
||||
return state.set('isFetching', true);
|
||||
} else if (action.type.indexOf('SUCCESS') > -1 || action.type.indexOf('FAILURE') > -1) {
|
||||
return state.set('isFetching', false);
|
||||
} else if (action.type === USE_FORK_WORKFLOW) {
|
||||
return state.set('useForkWorkflow', true);
|
||||
}
|
||||
return state;
|
||||
};
|
||||
|
Reference in New Issue
Block a user