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.
@@ -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>${progress} Installing ${name}</b>${message}` }, "notify")
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
- 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
- })
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.2.251",
3
+ "version": "3.2.252",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
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,
@@ -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
- 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
- })
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") {
@@ -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='terminal'></div>
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
  })