pinokiod 3.2.248 → 3.2.250
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 +7 -4
- package/package.json +1 -1
- package/server/views/app.ejs +1 -0
- package/server/views/index.ejs +23 -20
package/kernel/index.js
CHANGED
|
@@ -492,9 +492,7 @@ class Kernel {
|
|
|
492
492
|
// get env
|
|
493
493
|
if (!this.launch_complete) {
|
|
494
494
|
let interval = setInterval(async () => {
|
|
495
|
-
console.log(">>>>> 1")
|
|
496
495
|
if (this.i) {
|
|
497
|
-
console.log(">>>>> 2")
|
|
498
496
|
for(let api of this.i.api) {
|
|
499
497
|
console.log({ api })
|
|
500
498
|
let env_path = path.resolve(this.api.userdir, api.path)
|
|
@@ -522,8 +520,13 @@ class Kernel {
|
|
|
522
520
|
}
|
|
523
521
|
console.log("clear Interval")
|
|
524
522
|
clearInterval(interval)
|
|
525
|
-
|
|
526
|
-
|
|
523
|
+
await new Promise((resolve, reject) => {
|
|
524
|
+
setTimeout(() => {
|
|
525
|
+
this.launch_complete = true
|
|
526
|
+
console.log("SETTING launch complete", this.launch_complete)
|
|
527
|
+
resolve()
|
|
528
|
+
}, 1000)
|
|
529
|
+
})
|
|
527
530
|
}
|
|
528
531
|
}, 1000)
|
|
529
532
|
}
|
package/package.json
CHANGED
package/server/views/app.ejs
CHANGED
|
@@ -1472,6 +1472,7 @@ body.dark .loader-container {
|
|
|
1472
1472
|
fetch("/pinokio/log", {
|
|
1473
1473
|
method: "post",
|
|
1474
1474
|
}).then((res) => {
|
|
1475
|
+
console.log("RES", res)
|
|
1475
1476
|
let btn = document.querySelector("#genlog")
|
|
1476
1477
|
let btn2 = document.querySelector("#downloadlogs")
|
|
1477
1478
|
btn2.classList.remove("hidden")
|
package/server/views/index.ejs
CHANGED
|
@@ -735,6 +735,29 @@ if (document.querySelector("form input[type=search]")) {
|
|
|
735
735
|
})
|
|
736
736
|
}
|
|
737
737
|
<% if (ishome) { %>
|
|
738
|
+
// autolaunch display update
|
|
739
|
+
fetch("/pinokio/info").then((res) => {
|
|
740
|
+
return res.json()
|
|
741
|
+
}).then((res) => {
|
|
742
|
+
console.log("res", res)
|
|
743
|
+
if (res.launch_complete) {
|
|
744
|
+
// location.href = location.href
|
|
745
|
+
} else {
|
|
746
|
+
let interval = setInterval(async () => {
|
|
747
|
+
let res = await fetch("/pinokio/info").then((res) => {
|
|
748
|
+
return res.json()
|
|
749
|
+
})
|
|
750
|
+
console.log("res", res)
|
|
751
|
+
if (res.launch_complete) {
|
|
752
|
+
console.log("launched")
|
|
753
|
+
clearInterval(interval)
|
|
754
|
+
location.href = location.href
|
|
755
|
+
} else {
|
|
756
|
+
console.log("not yet launched")
|
|
757
|
+
}
|
|
758
|
+
}, 1000)
|
|
759
|
+
}
|
|
760
|
+
})
|
|
738
761
|
document.addEventListener("keydown", (e) => {
|
|
739
762
|
e = e || window.event;
|
|
740
763
|
if (e.key === "ArrowUp") {
|
|
@@ -1077,26 +1100,6 @@ if (document.querySelector("#genlog")) {
|
|
|
1077
1100
|
})
|
|
1078
1101
|
})
|
|
1079
1102
|
}
|
|
1080
|
-
fetch("/pinokio/info").then((res) => {
|
|
1081
|
-
return res.json()
|
|
1082
|
-
}).then((res) => {
|
|
1083
|
-
if (!res.launch_complete) {
|
|
1084
|
-
location.href = location.href
|
|
1085
|
-
} else {
|
|
1086
|
-
let interval = setInterval(async () => {
|
|
1087
|
-
let res = await fetch("/pinokio/info").then((res) => {
|
|
1088
|
-
return res.json()
|
|
1089
|
-
})
|
|
1090
|
-
if (res.launch_complete) {
|
|
1091
|
-
console.log("launched")
|
|
1092
|
-
clearInterval(interval)
|
|
1093
|
-
location.href = location.href
|
|
1094
|
-
} else {
|
|
1095
|
-
console.log("not yet launched")
|
|
1096
|
-
}
|
|
1097
|
-
}, 1000)
|
|
1098
|
-
}
|
|
1099
|
-
})
|
|
1100
1103
|
|
|
1101
1104
|
</script>
|
|
1102
1105
|
</body>
|