mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2024-11-25 18:33:11 +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
|
||||
- re-publish repo (bug: doesn't put all files in local repo after publishing)
|
||||
- allow text/binary change
|
||||
- importing from subtree commits to root anyway
|
||||
- astrocade
|
||||
- keyboard shortcuts
|
||||
- ctrl+alt+l on ubuntu locks screen
|
||||
|
@ -289,11 +289,15 @@ function loadProject(preset_id:string) {
|
||||
// file found; continue
|
||||
loadMainWindow(preset_id);
|
||||
} else {
|
||||
// no file data, load skeleton file
|
||||
getSkeletonFile(preset_id).then((skel) => {
|
||||
current_project.filedata[preset_id] = skel || "\n";
|
||||
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;
|
||||
gaEvent('workspace', 'file', 'new');
|
||||
qs['newfile'] = '1';
|
||||
reloadProject(path);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user