|
63 | 63 | <img src="https://cdn-icons-png.flaticon.com/512/569/569837.png" width="25px" height="25px" class="btn-dev" style="cursor: pointer;"> |
64 | 64 | </div> |
65 | 65 | <br><br><br> |
66 | | - <div data-title="Settings"> |
67 | | - <img src="https://cdn-icons-png.flaticon.com/512/2040/2040504.png" width="25px" height="25px" class="btn-setting" style="cursor: pointer; display: none;"> |
68 | | - </div> |
69 | | - <br><br><br> |
70 | 66 | <div data-title="Download Project"> |
71 | 67 | <img src="https://cdn-icons-png.flaticon.com/512/3580/3580085.png" width="25px" height="25px" class="btn-download" style="cursor: pointer;"> |
72 | 68 | </div> |
73 | 69 | <br><br><br> |
74 | 70 | <div data-title="Import Project"> |
75 | 71 | <img src="https://cdn-icons-png.flaticon.com/512/3889/3889512.png" width="25px" height="25px" class="btn-import" style="cursor: pointer;"> |
76 | 72 | </div> |
| 73 | + <br><br><br> |
| 74 | + <div data-title="Settings"> |
| 75 | + <img src="https://cdn-icons-png.flaticon.com/512/2040/2040504.png" width="25px" height="25px" class="btn-setting" style="cursor: pointer; display: none;"> |
| 76 | + </div> |
77 | 77 | </div> |
78 | 78 | <div id="container"> |
79 | 79 | <div class="left"> |
|
104 | 104 | </label> |
105 | 105 | </div> |
106 | 106 | <div id="settingsMenu"></div> |
107 | | - <i id="ver" style="font-size: 2rem;">v1.5.2</i> |
| 107 | + <i id="ver" style="font-size: 2rem;">v1.5.3</i> |
108 | 108 | <iframe frameborder="0" id="iframe"></iframe> |
109 | 109 | <div style="display: none;" class="tocl tocl-4"> |
110 | 110 | <p class="toclp">Console</p> |
|
236 | 236 | { |
237 | 237 | var zipFileLoaded = new JSZip(fileLoadedEvent.target.result); |
238 | 238 |
|
239 | | - window.afs = {"main": {}} |
| 239 | + window.afs = {}; |
| 240 | + window.afs["main"] = {}; |
240 | 241 |
|
241 | 242 | document.getElementById("eframe").contentDocument.getElementById("editor").innerHTML = ""; |
242 | 243 |
|
|
265 | 266 |
|
266 | 267 | var newOption = document.createElement("option"); |
267 | 268 |
|
268 | | - newOption.innerHTML = nameOfFileContainedInZipFile; |
| 269 | + newOption.innerHTML = splitFolder[1]; |
269 | 270 |
|
270 | | - document.querySelector('.language-picker').appendChild(newOption); |
| 271 | + if (document.querySelector(".folder-picker").options[document.querySelector(".folder-picker").selectedIndex].innerHTML === folder) { |
| 272 | + document.querySelector('.language-picker').appendChild(newOption); |
| 273 | + eframe.contentWindow.loadEditor(folder, file, window.afs); |
| 274 | + } |
271 | 275 | document.querySelector(".language-picker").style.display = ""; |
272 | | - |
273 | | - eframe.contentWindow.loadEditor(folder, file, window.afs); |
274 | 276 | } else { |
275 | 277 | var splitFile = nameOfFileContainedInZipFile.split("."); |
276 | 278 | var file = window.Base64.encode(splitFile[0]) + "-" + splitFile[1]; |
|
280 | 282 |
|
281 | 283 | newOption.innerHTML = nameOfFileContainedInZipFile; |
282 | 284 |
|
283 | | - document.querySelector('.language-picker').appendChild(newOption); |
| 285 | + if (document.querySelector(".folder-picker").options[document.querySelector(".folder-picker").selectedIndex].innerHTML === "main") { |
| 286 | + document.querySelector('.language-picker').appendChild(newOption); |
| 287 | + eframe.contentWindow.loadEditor("main", file, window.afs); |
| 288 | + } |
284 | 289 | document.querySelector(".language-picker").style.display = ""; |
285 | | - |
286 | | - eframe.contentWindow.loadEditor("main", file, window.afs); |
287 | 290 | } |
288 | 291 | } |
289 | 292 | }; |
|
0 commit comments