X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/12fbb73269d10424383cdbd712201498cc8d013a..8e6af2106e745285c5cda437d5856a99111686f8:/src/store/progress-indicator/progress-indicator-reducer.ts diff --git a/src/store/progress-indicator/progress-indicator-reducer.ts b/src/store/progress-indicator/progress-indicator-reducer.ts index 7e1c2362..daacdb76 100644 --- a/src/store/progress-indicator/progress-indicator-reducer.ts +++ b/src/store/progress-indicator/progress-indicator-reducer.ts @@ -3,23 +3,26 @@ // SPDX-License-Identifier: AGPL-3.0 import { ProgressIndicatorAction, progressIndicatorActions } from "~/store/progress-indicator/progress-indicator-actions"; +import { Dispatch } from 'redux'; +import { RootState } from '~/store/store'; +import { ServiceRepository } from '~/services/services'; export interface ProgressIndicatorState { - 'workbenchProgress': { started: boolean }; + 'sidePanelProgress': { started: boolean }; 'contentProgress': { started: boolean }; - 'detailsProgress': { started: boolean }; + // 'workbenchProgress': { started: boolean }; } const initialState: ProgressIndicatorState = { - 'workbenchProgress': { started: false }, + 'sidePanelProgress': { started: false }, 'contentProgress': { started: false }, - 'detailsProgress': { started: false } + // 'workbenchProgress': { started: false } }; export enum ProgressIndicatorData { - WORKBENCH_PROGRESS = 'workbenchProgress', + SIDE_PANEL_PROGRESS = 'sidePanelProgress', CONTENT_PROGRESS = 'contentProgress', - DETAILS_PROGRESS = 'detailsProgress' + // WORKBENCH_PROGRESS = 'workbenchProgress', } export const progressIndicatorReducer = (state: ProgressIndicatorState = initialState, action: ProgressIndicatorAction) => { @@ -32,3 +35,13 @@ export const progressIndicatorReducer = (state: ProgressIndicatorState = initial default: () => state, }); }; + +// export const getProgress = () => +// (dispatch: Dispatch, getState: () => RootState) => { +// const progress = getState().progressIndicator; +// if (progress.sidePanelProgress.started || progress.contentProgress.started) { +// dispatch(progressIndicatorActions.START_SUBMIT({ id: ProgressIndicatorData.WORKBENCH_PROGRESS })); +// } else { +// dispatch(progressIndicatorActions.STOP_SUBMIT({ id: ProgressIndicatorData.WORKBENCH_PROGRESS })); +// } +// };