pinokiod 3.233.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 +1 -1
- package/server/index.js +1 -1
- package/server/views/app.ejs +3 -1
- package/server/views/network.ejs +17 -13
package/package.json
CHANGED
package/server/index.js
CHANGED
package/server/views/app.ejs
CHANGED
|
@@ -4212,7 +4212,9 @@ body.dark .pinokio-fork-dropdown-remote, body.dark .pinokio-publish-dropdown-rem
|
|
|
4212
4212
|
const devTab = document.querySelector('#devtab.frame-link')
|
|
4213
4213
|
if (!triggeredByUser && !resolvedByGlobalSelector && !target && devRouteActive && devTab) {
|
|
4214
4214
|
const defaultCandidate = getDefaultSelection()
|
|
4215
|
-
if (
|
|
4215
|
+
if (pluginLaunchActive && defaultCandidate) {
|
|
4216
|
+
target = defaultCandidate
|
|
4217
|
+
} else {
|
|
4216
4218
|
target = devTab
|
|
4217
4219
|
}
|
|
4218
4220
|
}
|
package/server/views/network.ejs
CHANGED
|
@@ -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,12 +1228,13 @@ 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
|
|
1234
1235
|
} else {
|
|
1235
1236
|
console.log("> 2")
|
|
1236
|
-
location.
|
|
1237
|
+
location.reload()
|
|
1237
1238
|
}
|
|
1238
1239
|
}
|
|
1239
1240
|
} catch (e) {
|
|
@@ -1242,7 +1243,7 @@ document.querySelector("#reset-label").addEventListener("click", async (e) => {
|
|
|
1242
1243
|
}, 1000)
|
|
1243
1244
|
} else if (r.error) {
|
|
1244
1245
|
alert(r.error)
|
|
1245
|
-
location.
|
|
1246
|
+
location.reload()
|
|
1246
1247
|
}
|
|
1247
1248
|
}
|
|
1248
1249
|
|
|
@@ -1385,19 +1386,20 @@ 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
|
|
1398
1400
|
} else {
|
|
1399
1401
|
console.log("> 2")
|
|
1400
|
-
location.
|
|
1402
|
+
location.reload()
|
|
1401
1403
|
}
|
|
1402
1404
|
}
|
|
1403
1405
|
} catch (e) {
|
|
@@ -1406,7 +1408,7 @@ document.querySelector("main").addEventListener("click", async (e) => {
|
|
|
1406
1408
|
}, 1000)
|
|
1407
1409
|
} else if (r.error) {
|
|
1408
1410
|
alert(r.error)
|
|
1409
|
-
location.
|
|
1411
|
+
location.reload()
|
|
1410
1412
|
}
|
|
1411
1413
|
return
|
|
1412
1414
|
}
|
|
@@ -1431,7 +1433,7 @@ document.querySelector("main").addEventListener("click", async (e) => {
|
|
|
1431
1433
|
}).then((res) => {
|
|
1432
1434
|
return res.json()
|
|
1433
1435
|
})
|
|
1434
|
-
location.
|
|
1436
|
+
location.reload()
|
|
1435
1437
|
return
|
|
1436
1438
|
}
|
|
1437
1439
|
|
|
@@ -1455,7 +1457,7 @@ document.querySelector("main").addEventListener("click", async (e) => {
|
|
|
1455
1457
|
}).then((res) => {
|
|
1456
1458
|
return res.json()
|
|
1457
1459
|
})
|
|
1458
|
-
location.
|
|
1460
|
+
location.reload()
|
|
1459
1461
|
}
|
|
1460
1462
|
|
|
1461
1463
|
if (e.target.classList.contains("wifi-qr")) {
|
|
@@ -1510,7 +1512,7 @@ if (document.querySelector("#forward")) {
|
|
|
1510
1512
|
return res.json()
|
|
1511
1513
|
})
|
|
1512
1514
|
console.log(res)
|
|
1513
|
-
location.
|
|
1515
|
+
location.reload()
|
|
1514
1516
|
})
|
|
1515
1517
|
}
|
|
1516
1518
|
<% } else { %>
|
|
@@ -1530,21 +1532,22 @@ if (document.querySelector("#wifi")) {
|
|
|
1530
1532
|
return res.json()
|
|
1531
1533
|
})
|
|
1532
1534
|
console.log(res)
|
|
1533
|
-
location.
|
|
1535
|
+
location.reload()
|
|
1534
1536
|
})
|
|
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 {
|
|
1547
|
-
location.
|
|
1550
|
+
location.reload()
|
|
1548
1551
|
}
|
|
1549
1552
|
}
|
|
1550
1553
|
})
|
|
@@ -1556,7 +1559,8 @@ interval = setInterval(() => {
|
|
|
1556
1559
|
return res.json()
|
|
1557
1560
|
}).then((res) => {
|
|
1558
1561
|
if (res.updated) {
|
|
1559
|
-
|
|
1562
|
+
clearInterval(interval)
|
|
1563
|
+
location.reload()
|
|
1560
1564
|
}
|
|
1561
1565
|
})
|
|
1562
1566
|
}, 2000)
|