pinokiod 2.15.19 → 2.15.21

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.
@@ -178,8 +178,6 @@ body {
178
178
  }
179
179
  h1 {
180
180
  font-size: 50px;
181
- font-family: georgia;
182
- font-style: italic;
183
181
  padding-bottom: 20px;
184
182
  }
185
183
  footer {
@@ -234,20 +232,14 @@ document.addEventListener("DOMContentLoaded", async () => {
234
232
  return res.json()
235
233
  })
236
234
  console.log("res" ,res)
237
- <% if (init && name) { %>
238
- location.href = "/pinokio/browser/<%=name%>"
239
- <% } else { %>
240
- n.Noty({
241
- text: `Updated!`
242
- })
243
- <% } %>
235
+ location.href = "<%=path%>"
244
236
  })
245
237
  <% if (init) { %>
246
- /*
247
238
  document.querySelector("#customize").addEventListener("click", (e) => {
248
239
  e.preventDefault()
249
240
  e.stopPropagation()
250
241
  document.querySelector("#editor").classList.toggle("hidden")
242
+ document.querySelector("body").classList.toggle("center")
251
243
  })
252
244
  let editor = ace.edit("editor");
253
245
  editor.setTheme("ace/theme/nord_dark");
@@ -257,7 +249,6 @@ document.addEventListener("DOMContentLoaded", async () => {
257
249
  });
258
250
  editor.session.setMode("ace/mode/javascript");
259
251
  editor.clearSelection()
260
- */
261
252
  <% } %>
262
253
  })
263
254
  </script>
@@ -266,25 +257,38 @@ document.addEventListener("DOMContentLoaded", async () => {
266
257
  <main>
267
258
  <% if (init) { %>
268
259
  <div>
269
- <h1>Run</h1>
270
260
  <% if (config) { %>
271
261
  <div class='card'>
272
262
  <% if (config.icon) { %>
273
263
  <img src="<%=config.icon%>">
264
+ <% } else { %>
265
+ <img src="/term.png">
274
266
  <% } %>
275
267
  <div class='col'>
276
268
  <div class='title'><%=config.title%></div>
277
269
  <div class='description'><%=config.description%></div>
278
270
  </div>
279
271
  </div>
272
+ <div class='env-form'>
273
+ <% items.forEach((item) => { %>
274
+ <% if (item.type === "comment") { %>
275
+ <div class='comment'><%=item.val.replaceAll(/^[ #]+/g, "")%></div>
276
+ <% } else { %>
277
+ <div class='env-item'>
278
+ <label for="<%=item.key%>"><%=item.key%></label>
279
+ <input id="<%=item.key%>" type="text" value="<%=item.val%>">
280
+ </div>
281
+ <% } %>
282
+ <% }) %>
283
+ </div>
280
284
  <% } %>
281
285
  <footer>
282
286
  <a href="/" class='btn go-home'><i class='fa-solid fa-home'></i> home</a>
283
287
  <div class='flexible'></div>
284
- <a id='customize' class='btn' target="_blank" href='<%=_path%>'><i class='fa-solid fa-code'></i> View Script</a>
285
288
  <!--
286
- <button id='customize' class='btn'><i class="fa-solid fa-code"></i> View Script</button>
289
+ <a id='customize' class='btn' target="_blank" href='<%=_path%>'><i class='fa-solid fa-code'></i> View Script</a>
287
290
  -->
291
+ <button id='customize' class='btn'><i class="fa-solid fa-code"></i> View Script</button>
288
292
  <a id='save' href="<%=path%>" class='btn'>
289
293
  <span class='save'><i class="fa-solid fa-check"></i> Run</span>
290
294
  </a>
@@ -307,7 +311,7 @@ document.addEventListener("DOMContentLoaded", async () => {
307
311
  </h1>
308
312
  </header>
309
313
  <% } %>
310
- <div id='editor' class='<%=init ? "hidden" : ''%>'><%=str%></div>
311
314
  </main>
315
+ <div id='editor' class='<%=init ? "hidden" : ''%>'><%=str%></div>
312
316
  </body>
313
317
  </html>