mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2025-02-18 00:30:43 +00:00
alert when file not found, except for Create New File
This commit is contained in:
parent
c655628f37
commit
ceea8f292b
@ -163,6 +163,7 @@ TODO:
|
|||||||
- make sure to flatten subdirs
|
- make sure to flatten subdirs
|
||||||
- re-publish repo (bug: doesn't put all files in local repo after publishing)
|
- re-publish repo (bug: doesn't put all files in local repo after publishing)
|
||||||
- allow text/binary change
|
- allow text/binary change
|
||||||
|
- importing from subtree commits to root anyway
|
||||||
- astrocade
|
- astrocade
|
||||||
- keyboard shortcuts
|
- keyboard shortcuts
|
||||||
- ctrl+alt+l on ubuntu locks screen
|
- ctrl+alt+l on ubuntu locks screen
|
||||||
|
@ -289,11 +289,15 @@ function loadProject(preset_id:string) {
|
|||||||
// file found; continue
|
// file found; continue
|
||||||
loadMainWindow(preset_id);
|
loadMainWindow(preset_id);
|
||||||
} else {
|
} else {
|
||||||
// no file data, load skeleton file
|
|
||||||
getSkeletonFile(preset_id).then((skel) => {
|
getSkeletonFile(preset_id).then((skel) => {
|
||||||
current_project.filedata[preset_id] = skel || "\n";
|
current_project.filedata[preset_id] = skel || "\n";
|
||||||
loadMainWindow(preset_id);
|
loadMainWindow(preset_id);
|
||||||
//alertInfo("No existing file found; loading default file");
|
// don't alert if we selected "new file"
|
||||||
|
if (!qs['newfile']) {
|
||||||
|
alertInfo("Could not find file \"" + preset_id + "\". Loading default file.");
|
||||||
|
}
|
||||||
|
delete qs['newfile'];
|
||||||
|
replaceURLState();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -343,6 +347,7 @@ function _createNewFile(e) {
|
|||||||
}
|
}
|
||||||
var path = filename;
|
var path = filename;
|
||||||
gaEvent('workspace', 'file', 'new');
|
gaEvent('workspace', 'file', 'new');
|
||||||
|
qs['newfile'] = '1';
|
||||||
reloadProject(path);
|
reloadProject(path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user