Skip to content

Commit

Permalink
v1.5.5
Browse files Browse the repository at this point in the history
  • Loading branch information
smccle authored Mar 24, 2023
1 parent 07498f9 commit bb65349
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 102 deletions.
4 changes: 4 additions & 0 deletions devlog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
NEKO Code Editor Devlog
|-----------------------|

Update/Bug Fix v1.5.5 03/24/2023:
- Fixed "Import Project" Feature
- Updated indexedDB to use the latest version of IDB Keyval

Update v1.5.4 03/08/2023:
- Tidied up editor source code

Expand Down
2 changes: 2 additions & 0 deletions src/monaco/e.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ <h1 align="center" id="loader"></h1>
var data = {};

function loadEditor(sf, s, afs) {
window.data = {};

document.getElementById('editor').innerHTML = '';

document.getElementById('editor').style.opacity = 1;
Expand Down
106 changes: 8 additions & 98 deletions src/scripts/db.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/views/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<button class="btn" data-title="Account Settings" id="account">
Account Settings
</button>
<p id="ver">v1.5.4</p>
<p id="ver">v1.5.5</p>
</div>

<div class="projects-container">
Expand Down
16 changes: 13 additions & 3 deletions src/views/editor.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
</label>
</div>
<div id="settingsMenu"></div>
<i id="ver" style="font-size: 2rem;">v1.5.4</i>
<i id="ver" style="font-size: 2rem;">v1.5.5</i>
<iframe frameborder="0" id="iframe"></iframe>
<div style="display: none;" class="tocl tocl-4">
<p class="toclp">Console</p>
Expand Down Expand Up @@ -219,6 +219,7 @@
document.querySelector(".btn-import").onclick = function() {
var uinput = confirm("Do you want to import this project? It will clear any existing data.");
if (uinput) {
var eframe = document.getElementById("eframe");
var newLoad = document.createElement("input");

newLoad.type = "file";
Expand All @@ -244,12 +245,13 @@
document.querySelector(".folder-picker").innerHTML = "<option>main</option>";
document.querySelector(".language-picker").innerHTML = "";

var lastFile;
for (var nameOfFileContainedInZipFile in zipFileLoaded.files)
{
var fileContainedInZipFile = zipFileLoaded.files[nameOfFileContainedInZipFile];

var splitFolder = nameOfFileContainedInZipFile.split("/");
if (splitFolder.length > 1) {
if (splitFolder.length > 1 && splitFolder[1] !== "") {
var folder = splitFolder[0];
var splitFile = splitFolder[1].split(".");
var file = window.Base64.encode(splitFile[0]) + "-" + splitFile[1];
Expand All @@ -271,9 +273,13 @@
if (document.querySelector(".folder-picker").options[document.querySelector(".folder-picker").selectedIndex].innerHTML === folder) {
document.querySelector('.language-picker').appendChild(newOption);
eframe.contentWindow.loadEditor(folder, file, window.afs);
lastFile = [folder, file];
} else if (lastFile !== undefined) {
document.querySelector('.language-picker').appendChild(newOption);
eframe.contentWindow.loadEditor(lastFile[0], lastFile[1], window.afs);
}
document.querySelector(".language-picker").style.display = "";
} else {
} else if (splitFolder[1] !== "") {
var splitFile = nameOfFileContainedInZipFile.split(".");
var file = window.Base64.encode(splitFile[0]) + "-" + splitFile[1];
window.afs["main"][file] = fileContainedInZipFile.asText();
Expand All @@ -285,6 +291,10 @@
if (document.querySelector(".folder-picker").options[document.querySelector(".folder-picker").selectedIndex].innerHTML === "main") {
document.querySelector('.language-picker').appendChild(newOption);
eframe.contentWindow.loadEditor("main", file, window.afs);
lastFile = ["main", file];
} else if (lastFile !== undefined) {
document.querySelector('.language-picker').appendChild(newOption);
eframe.contentWindow.loadEditor(lastFile[0], lastFile[1], window.afs);
}
document.querySelector(".language-picker").style.display = "";
}
Expand Down

0 comments on commit bb65349

Please sign in to comment.