pinokiod 3.234.0 → 3.235.0

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.234.0",
3
+ "version": "3.235.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1220,7 +1220,7 @@ document.querySelector("#reset-label").addEventListener("click", async (e) => {
1220
1220
  method: "post"
1221
1221
  }, () => {
1222
1222
  })
1223
- setInterval(async () => {
1223
+ let i2 = setInterval(async () => {
1224
1224
  try {
1225
1225
  let res = await fetch("/check_peer").then((res) => {
1226
1226
  return res.json()
@@ -1228,6 +1228,7 @@ document.querySelector("#reset-label").addEventListener("click", async (e) => {
1228
1228
  console.log("RES", res)
1229
1229
  if (res.success) {
1230
1230
  document.querySelector(".loading").classList.add("hidden")
1231
+ clearInterval(i2)
1231
1232
  if (res.peer_name) {
1232
1233
  console.log("> 1")
1233
1234
  location.href = "/net/" + res.peer_name
@@ -1385,13 +1386,14 @@ document.querySelector("main").addEventListener("click", async (e) => {
1385
1386
  method: "post"
1386
1387
  }, () => {
1387
1388
  })
1388
- setInterval(async () => {
1389
+ let i3 = setInterval(async () => {
1389
1390
  try {
1390
1391
  let res = await fetch("/check_peer").then((res) => {
1391
1392
  return res.json()
1392
1393
  })
1393
1394
  if (res.success) {
1394
1395
  document.querySelector(".loading").classList.add("hidden")
1396
+ clearInterval(i3)
1395
1397
  if (res.peer_name) {
1396
1398
  console.log("> 1")
1397
1399
  location.href = "/net/" + res.peer_name
@@ -1535,12 +1537,13 @@ if (document.querySelector("#wifi")) {
1535
1537
  }
1536
1538
  <% } %>
1537
1539
  <% if (requirements_pending) { %>
1538
- setInterval(() => {
1540
+ let i1 = setInterval(() => {
1539
1541
  fetch("/requirements_check/network").then((res) => {
1540
1542
  return res.json()
1541
1543
  }).then((res) => {
1542
1544
  console.log(res)
1543
1545
  if (!res.requirements_pending) {
1546
+ clearInterval(i1)
1544
1547
  if (res.install_required) {
1545
1548
  location.href = "/setup/network?callback=/network"
1546
1549
  } else {
@@ -1556,6 +1559,7 @@ interval = setInterval(() => {
1556
1559
  return res.json()
1557
1560
  }).then((res) => {
1558
1561
  if (res.updated) {
1562
+ clearInterval(interval)
1559
1563
  location.reload()
1560
1564
  }
1561
1565
  })