pinokiod 3.25.0 → 3.26.0
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/caddy.js +1 -1
- package/kernel/index.js +1 -6
- package/kernel/peer.js +23 -5
- package/kernel/prototype.js +2 -0
- package/kernel/util.js +0 -1
- package/package.json +1 -1
- package/server/index.js +121 -56
- package/server/public/modalinput.js +3 -1
- package/server/views/500.ejs +7 -6
- package/server/views/app.ejs +32 -1
- package/server/views/d.ejs +52 -0
- package/server/views/init/index.ejs +82 -36
- package/server/views/install.ejs +7 -1
- package/server/views/net.ejs +94 -165
- package/server/views/start.ejs +38 -3
package/server/views/start.ejs
CHANGED
|
@@ -213,6 +213,11 @@ footer .btn.go-home {
|
|
|
213
213
|
text-decoration: none;
|
|
214
214
|
color: royalblue;
|
|
215
215
|
}
|
|
216
|
+
.auto {
|
|
217
|
+
display: flex;
|
|
218
|
+
align-items: center;
|
|
219
|
+
gap: 3px;
|
|
220
|
+
}
|
|
216
221
|
</style>
|
|
217
222
|
</head>
|
|
218
223
|
<body class='<%=theme%> center' data-agent="<%=agent%>">
|
|
@@ -222,12 +227,42 @@ footer .btn.go-home {
|
|
|
222
227
|
<img src="<%=image%>">
|
|
223
228
|
<div class='title'><%=name%></div>
|
|
224
229
|
<% if (link) { %>
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
230
|
+
<a href="<%=link%>" id='save' class='btn'>
|
|
231
|
+
<span class='save'><i class="fa-solid fa-play"></i> Launch</span>
|
|
232
|
+
</a>
|
|
228
233
|
<% } %>
|
|
234
|
+
<div class='auto'>
|
|
235
|
+
<input type='checkbox' <%=autolaunch ? 'checked' : ''%> id='autolaunch' />
|
|
236
|
+
<label for='autolaunch'>automatically launch</label>
|
|
237
|
+
</div>
|
|
238
|
+
<div class='message'></div>
|
|
229
239
|
</div>
|
|
230
240
|
</div>
|
|
231
241
|
</main>
|
|
242
|
+
<script>
|
|
243
|
+
let checkbox = document.querySelector("#autolaunch")
|
|
244
|
+
let save = document.querySelector("#save")
|
|
245
|
+
document.querySelector("#autolaunch").addEventListener("change", (e) => {
|
|
246
|
+
console.log({ checked: checkbox.checked })
|
|
247
|
+
let url = new URL(save.href)
|
|
248
|
+
if (checkbox.checked) {
|
|
249
|
+
url.searchParams.set("autolaunch", "1")
|
|
250
|
+
} else {
|
|
251
|
+
url.searchParams.set("autolaunch", "0")
|
|
252
|
+
}
|
|
253
|
+
save.href = url.toString()
|
|
254
|
+
})
|
|
255
|
+
console.log({ checked: checkbox.checked })
|
|
256
|
+
<% if (autolaunch) { %>
|
|
257
|
+
document.querySelector(".message").innerHTML = `<i class="fas fa-circle-notch fa-spin"></i> launching...`
|
|
258
|
+
setTimeout(() => {
|
|
259
|
+
if (checkbox.checked) {
|
|
260
|
+
document.querySelector("#save").click()
|
|
261
|
+
} else {
|
|
262
|
+
document.querySelector(".message").innerHTML = ""
|
|
263
|
+
}
|
|
264
|
+
}, 2000)
|
|
265
|
+
<% } %>
|
|
266
|
+
</script>
|
|
232
267
|
</body>
|
|
233
268
|
</html>
|