pinokiod 3.19.2 → 3.19.4

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.
@@ -38,15 +38,16 @@
38
38
  <a <%=item.default ? 'data-default' : ''%> data-confirm="<%=item.confirm%>" data-index="<%=index+4%>" target="<%=item.target%>" data-mode="<%=item.mode%>" href="<%=item.href%>" class='btn header-item frame-link <%=item.display || ""%>' <%=item.shell_id ? `data-shell=${item.shell_id}` : ""%> <%=item.script_id ? `data-script=${item.script_id}` : ''%>>
39
39
  <div class='tab'><%-item.btn%></div>
40
40
  <% if (item.running) { %>
41
- <!--
42
- <div class='loader shutdown online'>
43
- </div>
44
- -->
45
- <div class='loader shutdown'>
46
- <button class='btn'>
47
- <i class="fa-solid fa-square"></i> Stop
48
- </button>
49
- </div>
41
+ <% if (item.online) { %>
42
+ <div class='loader shutdown online'>
43
+ </div>
44
+ <% } else { %>
45
+ <div class='loader shutdown'>
46
+ <button class='btn'>
47
+ <i class="fa-solid fa-square"></i> Stop
48
+ </button>
49
+ </div>
50
+ <% } %>
50
51
  <% } else { %>
51
52
  <i class="fa-solid fa-angle-right"></i>
52
53
  <% } %>
@@ -221,6 +221,7 @@ textarea, input[type="url"], input[type="text"] {
221
221
  padding: 10px;
222
222
  border: none;
223
223
  font-family: inherit;
224
+ background: rgba(0,0,0,0.03);
224
225
  }
225
226
 
226
227
  textarea {
@@ -1342,7 +1343,6 @@ document.addEventListener('DOMContentLoaded', function() {
1342
1343
  type: "folder",
1343
1344
  }
1344
1345
  }, async (packet) => {
1345
- console.log('packet', packet)
1346
1346
  if (packet.type === "result") {
1347
1347
  if (packet.data.paths.length > 0) {
1348
1348
  let p = packet.data.paths[0]
@@ -185,7 +185,6 @@ document.addEventListener("DOMContentLoaded", async () => {
185
185
  this.dirty = true
186
186
  }
187
187
  finished() {
188
- debugger
189
188
  /*
190
189
  n.Noty({
191
190
  text: `[Success] All steps complete`,
@@ -327,7 +326,6 @@ document.addEventListener("DOMContentLoaded", async () => {
327
326
  this.write("\r\n")
328
327
  }
329
328
  if (packet.data.type === "shell.kill") {
330
- debugger
331
329
  this.socket.close()
332
330
  }
333
331
  if (packet.data.type === "emit2") {
@@ -346,7 +344,6 @@ document.addEventListener("DOMContentLoaded", async () => {
346
344
  document.querySelector(".starting-btn").classList.add("hidden")
347
345
  document.querySelector(".stop-btn").classList.remove("hidden")
348
346
  } else if (packet.type === 'disconnect') {
349
- debugger
350
347
  console.log("refreshParent", packet)
351
348
  refreshParent(packet)
352
349
  this.term.write("\r\nDisconnected...\r\n")
@@ -617,7 +614,6 @@ document.addEventListener("DOMContentLoaded", async () => {
617
614
  document.querySelector(".play-btn").classList.remove("hidden")
618
615
  document.querySelector(".stop-btn").classList.add("hidden")
619
616
  document.querySelector(".stopped-btn").classList.add("hidden")
620
- debugger
621
617
  <% if (kill_message) { %>
622
618
  n.Noty({
623
619
  text: "<%-kill_message%>",
@@ -674,6 +670,10 @@ document.addEventListener("DOMContentLoaded", async () => {
674
670
  selectionBackground: "red",
675
671
  selectionForeground: "white"
676
672
  })
673
+ console.log({ theme })
674
+ <% if (theme !== "dark") { %>
675
+ theme.foreground = "black"
676
+ <% } %>
677
677
 
678
678
  let config = {
679
679
  scrollback: 9999999,
@@ -810,7 +810,6 @@ document.addEventListener("DOMContentLoaded", async () => {
810
810
  document.querySelector(".play-btn").classList.remove("hidden")
811
811
  document.querySelector(".stop-btn").classList.add("hidden")
812
812
  })
813
- debugger
814
813
  <% if (running) { %>
815
814
  // if running, connect
816
815
  rpc.run("listen").then(() => {
@@ -181,16 +181,6 @@ document.addEventListener("DOMContentLoaded", async () => {
181
181
  this.buffer = []
182
182
  }
183
183
  write(text) {
184
- // console.log(text)
185
- // this.buffer += text;
186
- // if (!this.timeout) {
187
- // this.timeout = setTimeout(() => {
188
- // console.log("write", this.buffer)
189
- // this.term.write(this.buffer);
190
- // this.buffer = "";
191
- // this.timeout = null;
192
- // }, 50);
193
- // }
194
184
  if (text !== "\u0007") {
195
185
  this.term.write(text)
196
186
  }
@@ -207,7 +197,6 @@ document.addEventListener("DOMContentLoaded", async () => {
207
197
  document.querySelector(".run .starting").classList.add("hidden")
208
198
  }
209
199
  stop() {
210
- console.log("STOP")
211
200
  this.socket.run({
212
201
  method: "kernel.api.stop",
213
202
  params: {
@@ -309,7 +298,6 @@ document.addEventListener("DOMContentLoaded", async () => {
309
298
  shell_id = packet.data.id
310
299
  }
311
300
  if (packet.data.raw) {
312
- // console.log({ packet })
313
301
  this.write(packet.data.raw)
314
302
  } else if (packet.data.json) {
315
303
  this.write(JSON.stringify(packet.data.json).replace(/\n/g, "\r\n"))
@@ -320,7 +308,6 @@ document.addEventListener("DOMContentLoaded", async () => {
320
308
  }
321
309
  if (packet.data.type === "emit2") {
322
310
  // long text => still posting to the shell => show progress
323
- console.log("emit2", packet.data)
324
311
  document.querySelector("#status-window").innerHTML = `<strong>Pasting... (${Math.floor(100 * packet.data.i/packet.data.total)}%)</strong>`
325
312
  let percent = Math.floor(100 * packet.data.i/packet.data.total)
326
313
  document.querySelector("#progress-window").classList.remove("hidden")
@@ -469,7 +456,6 @@ document.addEventListener("DOMContentLoaded", async () => {
469
456
 
470
457
  refreshParent()
471
458
  let params = packet.data
472
- console.log("Web open", params)
473
459
  open_url(params.uri, params.target, params.features)
474
460
  // window.open(
475
461
  // params.uri,
@@ -685,11 +671,13 @@ document.addEventListener("DOMContentLoaded", async () => {
685
671
  selectionBackground: "red",
686
672
  selectionForeground: "white"
687
673
  })
688
-
674
+ <% if (theme !== "dark") { %>
675
+ theme.foreground = "black"
676
+ <% } %>
689
677
  let config = {
690
678
  scrollback: 9999999,
691
679
  //fontSize: 12,
692
- fontSize: 14,
680
+ //fontSize: 14,
693
681
  theme,
694
682
  //theme: xtermTheme.FrontEndDelight
695
683
  //theme: xtermTheme.Afterglow
@@ -721,8 +709,6 @@ document.addEventListener("DOMContentLoaded", async () => {
721
709
  }
722
710
  if ((event.ctrlKey || event.metaKey) && event.key === 'v') {
723
711
  navigator.clipboard.readText().then((text) => {
724
- console.log({ text })
725
-
726
712
  this.socket.run({
727
713
  //key: "\x1b[200~" + text + "\x1b[201~",
728
714
  key: text,