pinokiod 1.3.10 → 1.3.12
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/api/index.js
CHANGED
package/kernel/shell.js
CHANGED
|
@@ -147,8 +147,6 @@ class Shell {
|
|
|
147
147
|
}
|
|
148
148
|
// custom env was passed in
|
|
149
149
|
|
|
150
|
-
console.log("params", params)
|
|
151
|
-
|
|
152
150
|
// override cache folders if cache is specified
|
|
153
151
|
if (params.cache) {
|
|
154
152
|
// cache data files
|
|
@@ -168,7 +166,6 @@ class Shell {
|
|
|
168
166
|
]
|
|
169
167
|
for(let type of types) {
|
|
170
168
|
let p = path.resolve(cache_path, type)
|
|
171
|
-
console.log("setting", p)
|
|
172
169
|
this.env[type] = p
|
|
173
170
|
await fs.promises.mkdir(p, { recursive: true }).catch((e) => { })
|
|
174
171
|
}
|
|
@@ -232,7 +229,6 @@ class Shell {
|
|
|
232
229
|
// automatically add self to the shells registry
|
|
233
230
|
this.kernel.shell.add(this)
|
|
234
231
|
|
|
235
|
-
console.log("params", params)
|
|
236
232
|
if (params.sudo) {
|
|
237
233
|
let options = {
|
|
238
234
|
name: "Pinokio",
|
package/package.json
CHANGED
package/server/views/editor.ejs
CHANGED
|
@@ -736,7 +736,7 @@ const reloadMemory = async () => {
|
|
|
736
736
|
<% } else { %>
|
|
737
737
|
<body class='<%=theme%>'>
|
|
738
738
|
<% } %>
|
|
739
|
-
<header>
|
|
739
|
+
<header class='navheader'>
|
|
740
740
|
<% if (!install_required) { %>
|
|
741
741
|
<div class='runner'>
|
|
742
742
|
<div class='btn run <%= mod && runnable ? "" : "hidden" %>'>
|
|
@@ -395,30 +395,32 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
395
395
|
})
|
|
396
396
|
<% } %>
|
|
397
397
|
<% if (agent === "electron") { %>
|
|
398
|
-
document.querySelector("#del-browser-cache")
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
398
|
+
if (document.querySelector("#del-browser-cache")) {
|
|
399
|
+
document.querySelector("#del-browser-cache").addEventListener("click", async (e) => {
|
|
400
|
+
console.log("del-browser-cache")
|
|
401
|
+
let proceed = confirm("Are you sure you wish to delete the browser cache? This will remove all cookies and site data")
|
|
402
|
+
if (proceed) {
|
|
403
|
+
document.querySelector(".reset-browser-cache-loading").classList.remove("hidden")
|
|
404
|
+
document.querySelector("#del-browser-cache").classList.add("hidden")
|
|
405
|
+
let res = await fetch("/pinokio/delete", {
|
|
406
|
+
method: "post",
|
|
407
|
+
headers: {
|
|
408
|
+
"Content-Type": "application/json"
|
|
409
|
+
},
|
|
410
|
+
body: JSON.stringify({ type: "browser-cache" })
|
|
411
|
+
}).then((res) => {
|
|
412
|
+
return res.json()
|
|
413
|
+
})
|
|
414
|
+
console.log(res)
|
|
415
|
+
document.querySelector(".reset-browser-cache-loading").classList.add("hidden")
|
|
416
|
+
if (res.error) {
|
|
417
|
+
alert(res.error)
|
|
418
|
+
} else {
|
|
419
|
+
location.href = location.href
|
|
420
|
+
}
|
|
419
421
|
}
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
+
})
|
|
423
|
+
}
|
|
422
424
|
<% } %>
|
|
423
425
|
document.querySelector("form").addEventListener("submit", async (e) => {
|
|
424
426
|
e.preventDefault()
|