pinokiod 2.15.0 → 2.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/kernel/shell.js +2 -0
- package/package.json +1 -1
- package/server/index.js +18 -15
- package/server/views/index.ejs +18 -0
package/kernel/shell.js
CHANGED
package/package.json
CHANGED
package/server/index.js
CHANGED
|
@@ -2884,21 +2884,24 @@ class Server {
|
|
|
2884
2884
|
stack: err.stack
|
|
2885
2885
|
})
|
|
2886
2886
|
});
|
|
2887
|
-
process.on('SIGINT', () => {
|
|
2888
|
-
console.log("SIGINT Event")
|
|
2889
|
-
if (this.kernel && this.kernel.shell) this.kernel.shell.reset()
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2887
|
+
// process.on('SIGINT', () => {
|
|
2888
|
+
// console.log("SIGINT Event")
|
|
2889
|
+
// if (this.kernel && this.kernel.shell) this.kernel.shell.reset()
|
|
2890
|
+
// process.exit()
|
|
2891
|
+
// })
|
|
2892
|
+
// process.on('SIGTERM', () => {
|
|
2893
|
+
// console.log("SIGTERM Event")
|
|
2894
|
+
// if (this.kernel && this.kernel.shell) this.kernel.shell.reset()
|
|
2895
|
+
// process.exit()
|
|
2896
|
+
// })
|
|
2897
|
+
// process.on('exit', () => {
|
|
2898
|
+
// console.log("exit Event")
|
|
2899
|
+
// if (this.kernel && this.kernel.shell) {
|
|
2900
|
+
// console.log("this.kernel.shell.reset")
|
|
2901
|
+
// this.kernel.shell.reset()
|
|
2902
|
+
// }
|
|
2903
|
+
// process.exit()
|
|
2904
|
+
// })
|
|
2902
2905
|
|
|
2903
2906
|
|
|
2904
2907
|
// install
|
package/server/views/index.ejs
CHANGED
|
@@ -187,6 +187,8 @@ body.dark .browser-options-row {
|
|
|
187
187
|
<% if (agent === "electron") { %>
|
|
188
188
|
<a class='btn2' data-filepath="<%=filepath%>"><div><i class="fa-regular fa-folder-open"></i></div><div>Files</div></a>
|
|
189
189
|
<% } %>
|
|
190
|
+
<button class='btn2' id='genlog'><div><i class="fa-solid fa-laptop-code"></i></div><div>Debug</div></button>
|
|
191
|
+
<a id='downloadlogs' download class='hidden btn2' href="/pinokio/logs.zip"><div><i class="fa-solid fa-download"></i></div><div>Download logs</div></a>
|
|
190
192
|
<a class='btn2' href="/?mode=settings"><div><i class="fa-solid fa-gear"></i></div><div>Settings</div></a>
|
|
191
193
|
<button id='new-window' title='open a new window' class='btn2'><div><i class="fa-solid fa-plus"></i></div><div>Window</div></button>
|
|
192
194
|
</div>
|
|
@@ -1010,6 +1012,22 @@ document.querySelector("#back").addEventListener("click", (e) => {
|
|
|
1010
1012
|
document.querySelector("#forward").addEventListener("click", (e) => {
|
|
1011
1013
|
history.forward()
|
|
1012
1014
|
})
|
|
1015
|
+
document.querySelector("#genlog").addEventListener("click", (e) => {
|
|
1016
|
+
e.preventDefault()
|
|
1017
|
+
e.stopPropagation()
|
|
1018
|
+
e.target.innerHTML = '<i class="fa-solid fa-circle-notch fa-spin"></i>'
|
|
1019
|
+
fetch("/pinokio/log", {
|
|
1020
|
+
method: "post",
|
|
1021
|
+
}).then((res) => {
|
|
1022
|
+
console.log("RES", res)
|
|
1023
|
+
let btn = document.querySelector("#genlog")
|
|
1024
|
+
let btn2 = document.querySelector("#downloadlogs")
|
|
1025
|
+
btn2.classList.remove("hidden")
|
|
1026
|
+
btn.classList.add("hidden")
|
|
1027
|
+
btn.innerHTML = '<i class="fa-solid fa-circle-check"></i> Generated!'
|
|
1028
|
+
//btn.classList.add("hidden")
|
|
1029
|
+
})
|
|
1030
|
+
})
|
|
1013
1031
|
|
|
1014
1032
|
</script>
|
|
1015
1033
|
</body>
|