mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2025-02-16 17:30:27 +00:00
file upload asks you if you want to upload
This commit is contained in:
parent
f6cc973cdd
commit
731b083de4
15
src/ui.ts
15
src/ui.ts
@ -380,9 +380,18 @@ function handleFileUpload(files: File[]) {
|
|||||||
function uploadNextFile() {
|
function uploadNextFile() {
|
||||||
var f = files[index++];
|
var f = files[index++];
|
||||||
if (!f) {
|
if (!f) {
|
||||||
console.log("Done uploading");
|
console.log("Done uploading", index);
|
||||||
updateSelector();
|
if (index > 2) {
|
||||||
alertInfo("Files uploaded. Use the Project Selector if you want to load an uploaded file as a project.");
|
alertInfo("Files uploaded.");
|
||||||
|
setTimeout(updateSelector, 1000); // TODO: wait for files to upload
|
||||||
|
} else {
|
||||||
|
qs['file'] = files[0].name;
|
||||||
|
if (confirm("Open '" + qs['file'] + "' as project?")) {
|
||||||
|
gotoNewLocation();
|
||||||
|
} else {
|
||||||
|
updateSelector();
|
||||||
|
}
|
||||||
|
}
|
||||||
gaEvent('workspace', 'file', 'upload');
|
gaEvent('workspace', 'file', 'upload');
|
||||||
} else {
|
} else {
|
||||||
var path = f.name;
|
var path = f.name;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user