Allow to wrap multiple uploads under the same directory #95

Merged
kernelwhisperer merged 4 commits from bugfix/96-open-properties-after-file-upload into master 2018-05-05 07:08:20 -04:00
kernelwhisperer commented 2018-05-04 08:39:43 -04:00 (Migrated from github.com)

What changed?

If the user upload one file: just open the Property Window (Details)
If the user uploads multiple files (greater than 1) ask him/she if he/she wants to wrap the files, and then show just one property window for the wrapper. Otherwise fall back on the previous behavior (show the wrappers in an alert and allow to Open in browser)

This solves Redmine issue 96 and Github issue #87

## What changed? If the user upload one file: just open the Property Window (Details) If the user uploads multiple files (greater than 1) ask him/she if he/she wants to wrap the files, and then show just one property window for the wrapper. Otherwise fall back on the previous behavior (show the wrappers in an alert and allow to `Open in browser`) This solves Redmine issue 96 and Github issue #87
koalalorenzo (Migrated from github.com) requested changes 2018-05-05 02:56:09 -04:00
@ -52,72 +52,114 @@ export function initIPFSClient () {
}
koalalorenzo (Migrated from github.com) commented 2018-05-05 02:29:01 -04:00

Docs, what does this do? Where could this be used?

Docs, what does this do? Where could this be used?
koalalorenzo (Migrated from github.com) commented 2018-05-05 02:32:35 -04:00

It will simplify a lot if you could switch to always array (you can have an array of 1 element).
This will remove some conditions in the code and simplify the logic, but it will require on the implementation of the function to use arrays.

Don't mix types of variables

It will simplify a lot if you could switch to always array (you can have an array of 1 element). This will remove some conditions in the code and simplify the logic, but it will require on the implementation of the function to use arrays. Don't mix types of variables
koalalorenzo (Migrated from github.com) commented 2018-05-05 02:32:55 -04:00

exactly this :D (see previous comment)

exactly this :D (see previous comment)
koalalorenzo (Migrated from github.com) commented 2018-05-05 02:48:59 -04:00
https://github.com/Siderus/Orion/pull/95/files#diff-45bba5770252947b22079e6d12f321dfR40 Is it returning a promise?
@ -7,0 +12,4 @@
* @returns {boolean}
*/
function askWhetherToWrapAllFiles () {
const buttons = ['No', 'Yes']
koalalorenzo (Migrated from github.com) commented 2018-05-05 02:48:00 -04:00

well done :) Having this in a method will be useful!

well done :) Having this in a method will be useful!
koalalorenzo commented 2018-05-05 03:03:29 -04:00 (Migrated from github.com)

Manually tested it Looks good to me, I would like just to change the type used for the params of addFileOrFilesFromFSPath to be sure that is always the same type (array).

Maybe in the future typescript will help us :)

Manually tested it Looks good to me, I would like just to change the type used for the params of `addFileOrFilesFromFSPath` to be sure that is always the same type (array). Maybe in the future typescript will help us :)
koalalorenzo (Migrated from github.com) approved these changes 2018-05-05 05:38:40 -04:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Siderus/Orion!95
No description provided.