X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/59b24ea9a90ba60563316a5c2ad4c7ce8a8c423d..4a4da2249d80ed4116f534689684abff61ee2cd9:/src/store/file-uploader/file-uploader-actions.ts diff --git a/src/store/file-uploader/file-uploader-actions.ts b/src/store/file-uploader/file-uploader-actions.ts index 906263fe..a397bbd8 100644 --- a/src/store/file-uploader/file-uploader-actions.ts +++ b/src/store/file-uploader/file-uploader-actions.ts @@ -2,7 +2,9 @@ // // SPDX-License-Identifier: AGPL-3.0 -import { unionize, ofType, UnionOf } from "~/common/unionize"; +import { unionize, ofType, UnionOf } from "common/unionize"; +import { Dispatch } from "redux"; +import { RootState } from 'store/store'; export interface UploadFile { id: number; @@ -18,8 +20,15 @@ export interface UploadFile { export const fileUploaderActions = unionize({ CLEAR_UPLOAD: ofType(), SET_UPLOAD_FILES: ofType(), + UPDATE_UPLOAD_FILES: ofType(), SET_UPLOAD_PROGRESS: ofType<{ fileId: number, loaded: number, total: number, currentTime: number }>(), START_UPLOAD: ofType(), + DELETE_UPLOAD_FILE: ofType(), + CANCEL_FILES_UPLOAD: ofType(), }); export type FileUploaderAction = UnionOf; + +export const getFileUploaderState = () => (dispatch: Dispatch, getState: () => RootState) => { + return getState().fileUploader; +}; \ No newline at end of file