Closed d3nd3 closed 2 years ago
Wow, yes. Definitely make this only work if something is set in options
passed into fileOpenDialog. This'll break a lot of stuff otherwise.
What happens for multiple files? callback
just gets called multiple times?
Other thing to consider is stuff like images will want to pop up a dialog box (and also files may want to be renamed). You can't have multiple dialogs overlapping either, so were you just planning on having a second upload multiple
menu item that just uploads direct?
Other thing is you could easily change the Bangle.js app loader's restore function. Right now it erases and uploads every file from a zip. Literally all you'd have to do is a new menu item that uploads files from a zip without erasing first.
Looks like this will still allow multiple selection but will just fail silently if you do?
Can we just not call fileLoader.setAttribute("multiple","multiple");
if multiple files haven't been requested?
Also, please could you stick readerLoaded and setupReader inside fileOpenDialog? Since that's the only place they are needed I think?
Okay, i'm just trying to clean the commits, squash them, its ugly
Btw, I am not sure how to link in the EspruinoTools to the WebIDE, I think i've maybe broken the link somehow. To wrong commit?
What happens for multiple files? callback just gets called multiple times?
Yes, exactly.
so were you just planning on having a second upload multiple menu item that just uploads direct?
I was thinking to use the 'Upload File' , it asks to rename for all of them, one by one the popup box appear repeatedly. Its a bit annoying perhaps, or its fine, depend which way you look at it.
Literally all you'd have to do is a new menu item that uploads files from a zip without erasing first.
This idea could be implemented also.
Ok I'm done. What do you think? Btw I want to also improve some other things with the IDE like on mobile its a bit unusable, I need a way to delete all text on right hand side quickly, and fix the keyboard because it sometimes acts slow and doesnt let me delete a line completely.
The prompts for Image adjusting and file renaming stack on top of each other, I have to click through them all one by one. The upload seems to occur after I confirm each one.
Looks great, thanks!
Some more work on the IDE for mobile would be great. If you're on Android did you try 'hackers keyboard'? I find it works pretty well, but I guess some tweaks to make it work better with the default keyboard would be great.
I wanted this feature for the WebIDE storage.js plugin. Perhaps this is not the place to implement it since it might affect other file dialogs?
We could make instead that it can request multi or not multi, instead of just be multi supported always, in case it breaks the times when you strictly want solo file selection.
you can see active here https://d3nd3.github.io/EspruinoWebIDE/