pinokiod 1.1.39 → 1.1.41

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/index.js CHANGED
@@ -221,6 +221,7 @@ class Kernel {
221
221
  "XDG_CACHE_HOME",
222
222
  "PIP_CACHE_DIR",
223
223
  "PIP_TMPDIR",
224
+ "TMPDIR",
224
225
  "TEMP",
225
226
  "TMP",
226
227
  "XDG_DATA_HOME",
package/kernel/shell.js CHANGED
@@ -110,6 +110,7 @@ class Shell {
110
110
  this.env.XDG_CACHE_HOME = path.resolve(this.kernel.homedir, "cache", "XDG_CACHE_HOME")
111
111
  this.env.PIP_CACHE_DIR = path.resolve(this.kernel.homedir, "cache", "PIP_CACHE_DIR")
112
112
  this.env.PIP_TMPDIR = path.resolve(this.kernel.homedir, "cache", "PIP_TMPDIR")
113
+ this.env.TMPDIR = path.resolve(this.kernel.homedir, "cache", "TMPDIR")
113
114
  this.env.TEMP = path.resolve(this.kernel.homedir, "cache", "TEMP")
114
115
  this.env.TMP = path.resolve(this.kernel.homedir, "cache", "TMP")
115
116
  this.env.XDG_DATA_HOME = path.resolve(this.kernel.homedir, "cache", "XDG_DATA_HOME")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "1.1.39",
3
+ "version": "1.1.41",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -317,54 +317,56 @@ hr {
317
317
  document.addEventListener("DOMContentLoaded", async () => {
318
318
  Reporter()
319
319
  const n = new N()
320
- document.querySelector("#del-bin").addEventListener("click", async (e) => {
321
- console.log("del-bin")
322
- let proceeed = confirm("Are you sure you wish to delete the bin folder?")
323
- if (proceed) {
324
- document.querySelector(".reset-bin-loading").classList.remove("hidden")
325
- document.querySelector("#del-bin").classList.add("hidden")
326
- let res = await fetch("/pinokio/delete", {
327
- method: "post",
328
- headers: {
329
- "Content-Type": "application/json"
330
- },
331
- body: JSON.stringify({ type: "bin" })
332
- }).then((res) => {
333
- return res.json()
334
- })
335
- console.log(res)
336
- document.querySelector(".reset-bin-loading").classList.add("hidden")
337
- if (res.error) {
338
- alert(res.error)
339
- } else {
340
- location.href = location.href
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
- document.querySelector("#del-cache").addEventListener("click", async (e) => {
345
- console.log("del-cache")
346
- let proceeed = confirm("Are you sure you wish to delete the cache folder?")
347
- if (proceed) {
348
- document.querySelector(".reset-cache-loading").classList.remove("hidden")
349
- document.querySelector("#del-cache").classList.add("hidden")
350
- let res = await fetch("/pinokio/delete", {
351
- method: "post",
352
- headers: {
353
- "Content-Type": "application/json"
354
- },
355
- body: JSON.stringify({ type: "cache" })
356
- }).then((res) => {
357
- return res.json()
358
- })
359
- console.log(res)
360
- document.querySelector(".reset-cache-loading").classList.add("hidden")
361
- if (res.error) {
362
- alert(res.error)
363
- } else {
364
- location.href = location.href
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()