pinokiod 3.2.251 → 3.2.252
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/bin/index.js +1 -1
- package/kernel/index.js +4 -7
- package/package.json +1 -1
- package/server/index.js +1 -0
- package/server/views/index.ejs +16 -22
- package/server/views/install.ejs +21 -2
package/kernel/bin/index.js
CHANGED
|
@@ -552,7 +552,7 @@ class Bin {
|
|
|
552
552
|
if (m.name === name) {
|
|
553
553
|
//await m.mod.install(this, ondata)
|
|
554
554
|
const message = `${m.mod.description ? '<br>' + m.mod.description : ''}`
|
|
555
|
-
ondata({ html: `<b
|
|
555
|
+
ondata({ html: `<b><i class="fas fa-circle-notch fa-spin"></i> ${progress} Installing ${name}</b>${message}` }, "notify")
|
|
556
556
|
console.log("## Before m.mod.install", requirement)
|
|
557
557
|
await m.mod.install(requirement, ondata, this.kernel)
|
|
558
558
|
|
package/kernel/index.js
CHANGED
|
@@ -520,13 +520,10 @@ class Kernel {
|
|
|
520
520
|
}
|
|
521
521
|
console.log("clear Interval")
|
|
522
522
|
clearInterval(interval)
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
resolve()
|
|
528
|
-
}, 1000)
|
|
529
|
-
})
|
|
523
|
+
setTimeout(() => {
|
|
524
|
+
this.launch_complete = true
|
|
525
|
+
console.log("SETTING launch complete", this.launch_complete)
|
|
526
|
+
}, 2000)
|
|
530
527
|
}
|
|
531
528
|
}, 1000)
|
|
532
529
|
}
|
package/package.json
CHANGED
package/server/index.js
CHANGED
|
@@ -1361,6 +1361,7 @@ class Server {
|
|
|
1361
1361
|
if (meta) {
|
|
1362
1362
|
items = running.concat(notRunning)
|
|
1363
1363
|
res.render("index", {
|
|
1364
|
+
launch_complete: this.kernel.launch_complete,
|
|
1364
1365
|
home_url: `http://localhost:${this.port}`,
|
|
1365
1366
|
proxy: home_proxy,
|
|
1366
1367
|
cloudflare_pub: this.cloudflare_pub,
|
package/server/views/index.ejs
CHANGED
|
@@ -735,29 +735,23 @@ if (document.querySelector("form input[type=search]")) {
|
|
|
735
735
|
})
|
|
736
736
|
}
|
|
737
737
|
<% if (ishome) { %>
|
|
738
|
+
// if launch_complete is true => already finished launching so no need to refresh
|
|
739
|
+
// if launch_complete is false => not finished launching. wait until it's complete, and then refresh
|
|
738
740
|
// autolaunch display update
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
clearInterval(interval)
|
|
754
|
-
location.href = location.href
|
|
755
|
-
} else {
|
|
756
|
-
console.log("not yet launched")
|
|
757
|
-
}
|
|
758
|
-
}, 1000)
|
|
759
|
-
}
|
|
760
|
-
})
|
|
741
|
+
<% if (!launch_complete) { %>
|
|
742
|
+
let interval = setInterval(async () => {
|
|
743
|
+
let res = await fetch("/pinokio/info").then((res) => {
|
|
744
|
+
return res.json()
|
|
745
|
+
})
|
|
746
|
+
if (res.launch_complete) {
|
|
747
|
+
console.log("launched")
|
|
748
|
+
clearInterval(interval)
|
|
749
|
+
location.href = location.href
|
|
750
|
+
} else {
|
|
751
|
+
console.log("not yet launched")
|
|
752
|
+
}
|
|
753
|
+
}, 1000)
|
|
754
|
+
<% } %>
|
|
761
755
|
document.addEventListener("keydown", (e) => {
|
|
762
756
|
e = e || window.event;
|
|
763
757
|
if (e.key === "ArrowUp") {
|
package/server/views/install.ejs
CHANGED
|
@@ -94,6 +94,21 @@ body {
|
|
|
94
94
|
.timestamp {
|
|
95
95
|
color: rgba(0,0,0,0.5);
|
|
96
96
|
}
|
|
97
|
+
#status-screen {
|
|
98
|
+
padding: 10px;
|
|
99
|
+
box-sizing: border-box;
|
|
100
|
+
width: 100%;
|
|
101
|
+
margin: 0;
|
|
102
|
+
background: royalblue;
|
|
103
|
+
overflow: auto;
|
|
104
|
+
color: white;
|
|
105
|
+
/*
|
|
106
|
+
color: rgb(27, 28, 29);
|
|
107
|
+
*/
|
|
108
|
+
}
|
|
109
|
+
#status-screen b {
|
|
110
|
+
color: white;
|
|
111
|
+
}
|
|
97
112
|
</style>
|
|
98
113
|
<script src="/hotkeys.min.js"></script>
|
|
99
114
|
<script src="/sweetalert2.js"></script>
|
|
@@ -113,7 +128,10 @@ body {
|
|
|
113
128
|
</head>
|
|
114
129
|
<body class='<%=theme%>'>
|
|
115
130
|
<header class='grabbable'></header>
|
|
116
|
-
<div id='
|
|
131
|
+
<div id='status-screen'></div>
|
|
132
|
+
<div class='terminal-container'>
|
|
133
|
+
<div id='terminal'></div>
|
|
134
|
+
</div>
|
|
117
135
|
<input id='requirements' type='hidden' value="<%=requirements%>">
|
|
118
136
|
<input id='callback' type='hidden' value="<%=callback%>">
|
|
119
137
|
<script>
|
|
@@ -221,7 +239,8 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
221
239
|
if (packet.data.type) {
|
|
222
240
|
payload.type = packet.data.type
|
|
223
241
|
}
|
|
224
|
-
n.Noty(payload)
|
|
242
|
+
// n.Noty(payload)
|
|
243
|
+
document.querySelector("#status-screen").innerHTML = packet.data.html
|
|
225
244
|
}
|
|
226
245
|
}
|
|
227
246
|
})
|