Add clearing inputs after collection create, improved disabled create collection...
[arvados-workbench2.git] / src / store / collections / uploader / collection-uploader-actions.ts
1 // Copyright (C) The Arvados Authors. All rights reserved.\r
2 //\r
3 // SPDX-License-Identifier: AGPL-3.0\r
4 \r
5 import { default as unionize, ofType, UnionOf } from "unionize";\r
6 \r
7 export interface UploadFile {\r
8     id: number;\r
9     file: File;\r
10     prevLoaded: number;\r
11     loaded: number;\r
12     total: number;\r
13     startTime: number;\r
14     prevTime: number;\r
15     currentTime: number;\r
16 }\r
17 \r
18 export const collectionUploaderActions = unionize({\r
19     SET_UPLOAD_FILES: ofType<File[]>(),\r
20     START_UPLOAD: ofType(),\r
21     SET_UPLOAD_PROGRESS: ofType<{ fileId: number, loaded: number, total: number, currentTime: number }>(),\r
22     CLEAR_UPLOAD: ofType()\r
23 }, {\r
24     tag: 'type',\r
25     value: 'payload'\r
26 });\r
27 \r
28 export type CollectionUploaderAction = UnionOf<typeof collectionUploaderActions>;\r