pinokiod 1.1.39 → 1.1.40
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/package.json +1 -1
- package/server/views/settings.ejs +48 -46
package/package.json
CHANGED
|
@@ -317,54 +317,56 @@ hr {
|
|
|
317
317
|
document.addEventListener("DOMContentLoaded", async () => {
|
|
318
318
|
Reporter()
|
|
319
319
|
const n = new N()
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
320
|
+
<% if (locals.bin) { %>
|
|
321
|
+
document.querySelector("#del-bin").addEventListener("click", async (e) => {
|
|
322
|
+
console.log("del-bin")
|
|
323
|
+
let proceeed = confirm("Are you sure you wish to delete the bin folder?")
|
|
324
|
+
if (proceed) {
|
|
325
|
+
document.querySelector(".reset-bin-loading").classList.remove("hidden")
|
|
326
|
+
document.querySelector("#del-bin").classList.add("hidden")
|
|
327
|
+
let res = await fetch("/pinokio/delete", {
|
|
328
|
+
method: "post",
|
|
329
|
+
headers: {
|
|
330
|
+
"Content-Type": "application/json"
|
|
331
|
+
},
|
|
332
|
+
body: JSON.stringify({ type: "bin" })
|
|
333
|
+
}).then((res) => {
|
|
334
|
+
return res.json()
|
|
335
|
+
})
|
|
336
|
+
console.log(res)
|
|
337
|
+
document.querySelector(".reset-bin-loading").classList.add("hidden")
|
|
338
|
+
if (res.error) {
|
|
339
|
+
alert(res.error)
|
|
340
|
+
} else {
|
|
341
|
+
location.href = location.href
|
|
342
|
+
}
|
|
341
343
|
}
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
344
|
+
})
|
|
345
|
+
document.querySelector("#del-cache").addEventListener("click", async (e) => {
|
|
346
|
+
console.log("del-cache")
|
|
347
|
+
let proceeed = confirm("Are you sure you wish to delete the cache folder?")
|
|
348
|
+
if (proceed) {
|
|
349
|
+
document.querySelector(".reset-cache-loading").classList.remove("hidden")
|
|
350
|
+
document.querySelector("#del-cache").classList.add("hidden")
|
|
351
|
+
let res = await fetch("/pinokio/delete", {
|
|
352
|
+
method: "post",
|
|
353
|
+
headers: {
|
|
354
|
+
"Content-Type": "application/json"
|
|
355
|
+
},
|
|
356
|
+
body: JSON.stringify({ type: "cache" })
|
|
357
|
+
}).then((res) => {
|
|
358
|
+
return res.json()
|
|
359
|
+
})
|
|
360
|
+
console.log(res)
|
|
361
|
+
document.querySelector(".reset-cache-loading").classList.add("hidden")
|
|
362
|
+
if (res.error) {
|
|
363
|
+
alert(res.error)
|
|
364
|
+
} else {
|
|
365
|
+
location.href = location.href
|
|
366
|
+
}
|
|
365
367
|
}
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
+
})
|
|
369
|
+
<% } %>
|
|
368
370
|
document.querySelector("form").addEventListener("submit", async (e) => {
|
|
369
371
|
e.preventDefault()
|
|
370
372
|
e.stopPropagation()
|