projects
/
arvados-workbench2.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'origin/main' into 18207-Workbench2-is-not-clearing...
[arvados-workbench2.git]
/
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 906263fe140d0af10f75fed425c2e53d20d866a5..a397bbd825f23d7f936fa63470b2a091f27a2642 100644
(file)
--- 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
//
// 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;
export interface UploadFile {
id: number;
@@
-18,8
+20,15
@@
export interface UploadFile {
export const fileUploaderActions = unionize({
CLEAR_UPLOAD: ofType(),
SET_UPLOAD_FILES: ofType<File[]>(),
export const fileUploaderActions = unionize({
CLEAR_UPLOAD: ofType(),
SET_UPLOAD_FILES: ofType<File[]>(),
+ UPDATE_UPLOAD_FILES: ofType<File[]>(),
SET_UPLOAD_PROGRESS: ofType<{ fileId: number, loaded: number, total: number, currentTime: number }>(),
START_UPLOAD: ofType(),
SET_UPLOAD_PROGRESS: ofType<{ fileId: number, loaded: number, total: number, currentTime: number }>(),
START_UPLOAD: ofType(),
+ DELETE_UPLOAD_FILE: ofType<UploadFile>(),
+ CANCEL_FILES_UPLOAD: ofType(),
});
export type FileUploaderAction = UnionOf<typeof fileUploaderActions>;
});
export type FileUploaderAction = UnionOf<typeof fileUploaderActions>;
+
+export const getFileUploaderState = () => (dispatch: Dispatch, getState: () => RootState) => {
+ return getState().fileUploader;
+};
\ No newline at end of file