girder / girder_web_components

Reusable Javascript and VueJS components for interacting with a Girder server.
https://gwc.girder.org
Apache License 2.0
16 stars 9 forks source link

Upload/mixin #200

Closed subdavis closed 4 years ago

subdavis commented 4 years ago

Not sure why it never occurred to me to do this before.

Extract upload mechanics into a mixin such that consumers can build their own uploaders without being constrained to the layout of the provided version.

Added some comments to explain the usage of the mixin.

There have been no code/logic changes aside from parameterizing the start() method to accept pre, post, and class. This PR just moves the functions from one file to another.

I think a future PR should remove some of the fringe capabilities of the Upload component and instead just let a consumer write it themselves with this mixin. for example, the dropzone slot is useless without slot props to access state.