pinokiod 3.9.28 → 3.9.30

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.
@@ -0,0 +1,646 @@
1
+ <html>
2
+ <head>
3
+ <title>Pinokio</title>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
6
+ <link href="/xterm.min.css" rel="stylesheet" />
7
+ <link href="/css/fontawesome.min.css" rel="stylesheet">
8
+ <link href="/css/solid.min.css" rel="stylesheet">
9
+ <link href="/css/regular.min.css" rel="stylesheet">
10
+ <link href="/css/brands.min.css" rel="stylesheet">
11
+ <link href="/markdown.css" rel="stylesheet"/>
12
+ <link href="/noty.css" rel="stylesheet"/>
13
+ <link href="/filepond.min.css" rel="stylesheet" />
14
+ <link href="/filepond-plugin-image-preview.min.css" rel="stylesheet" />
15
+ <link href="/filepond-plugin-image-edit.min.css" rel="stylesheet" />
16
+ <link href="/style.css" rel="stylesheet"/>
17
+ <% if (agent === "electron") { %>
18
+ <link href="/electron.css" rel="stylesheet"/>
19
+ <% } %>
20
+ <style>
21
+ .line2 {
22
+ display: flex;
23
+ align-items: center;
24
+ cursor: pointer;
25
+ background: rgba(0,0,100,0.04);
26
+ }
27
+ .line2 a {
28
+ text-decoration: none;
29
+ color: black;
30
+ }
31
+ .status {
32
+ padding: 10px;
33
+ margin: 10px;
34
+ border-radius: 10px;
35
+ }
36
+ .status.offline {
37
+ background: silver;
38
+ }
39
+ .status.online {
40
+ background: yellowgreen;
41
+ }
42
+ .switch {
43
+ padding: 10px;
44
+ margin: 10px 0;
45
+ }
46
+ .switch[data-online=true] {
47
+ color: yellowgreen;
48
+ }
49
+ .button {
50
+ padding: 10px;
51
+ }
52
+ .on, .off {
53
+ display: flex;
54
+ align-items: center;
55
+ }
56
+ header .runner {
57
+ padding: 10px 0 0;
58
+ }
59
+ .proxy {
60
+ padding: 0 10px;
61
+ text-align: right;
62
+ }
63
+ .proxy a {
64
+ text-decoration: none;
65
+ display: inline-block;
66
+ padding: 5px 10px;
67
+ border-radius: 2px;
68
+ background: black;
69
+ color: white;
70
+ }
71
+ .browser-options-btns {
72
+ display: flex;
73
+ padding-top: 5px;
74
+ }
75
+ .browser-options-row {
76
+ /*
77
+ border-top: 1px solid rgba(0,0,0,0.1);
78
+ border-bottom: 1px solid rgba(0,0,0,0.1);
79
+ */
80
+ display: flex;
81
+ padding: 10px;
82
+ align-items: flex-start;
83
+ }
84
+ .browser-options-row h3 {
85
+ margin: 0;
86
+ font-size: 14px;
87
+ margin-bottom: 3px;
88
+ }
89
+ .browser-options-row .btn.disabled {
90
+ opacity: 0.7;
91
+ }
92
+ .browser-options-row .btn {
93
+ font-weight: bold;
94
+ width: 100px;
95
+ text-align: center;
96
+ display: block;
97
+ margin-right: 10px;
98
+ flex-shrink: 0;
99
+ padding: 5px;
100
+ }
101
+ .badge {
102
+ font-size: 12px;
103
+ padding: 5px 10px;
104
+ background: rgba(0,0,100,0.1);
105
+ border-radius: 5px;
106
+ display: inline-block;
107
+ margin-top: 5px;
108
+ }
109
+ a.badge {
110
+ color: royalblue;
111
+ text-decoration: none;
112
+ cursor: pointer;
113
+ }
114
+ .badge a {
115
+ color: royalblue;
116
+ text-decoration: none;
117
+ }
118
+ body.dark .btn {
119
+ color: white;
120
+ border: 1px solid rgba(255,255,255,0.3);
121
+ }
122
+ body.dark .badge {
123
+ background: rgba(255,255,255,0.1);
124
+ }
125
+ .folder-templates {
126
+ background: rgba(0,0,100, 0.02);
127
+ }
128
+ .folder-templates .folder {
129
+ text-decoration: none;
130
+ color: rgba(0,0,0,0.9);
131
+ font-size: 12px;
132
+ padding: 10px;
133
+ display: flex;
134
+ align-items: center;
135
+ }
136
+ .folder-templates .folder .title {
137
+ font-weight: bold;
138
+ font-size: 15px;
139
+ text-transform: capitalize;
140
+ }
141
+ .folder-templates .folder img {
142
+ width: 30px;
143
+ height: 30px;
144
+ margin-right: 10px;
145
+ border-radius: 10px;
146
+ }
147
+ body.dark .prototype-header {
148
+ color: white;
149
+ }
150
+ .prototype-header .btn {
151
+ border: 1px solid rgba(255,255,255,0.3);
152
+ }
153
+ .prototype-header {
154
+ align-items: center;
155
+ display: flex;
156
+ padding: 40px 20px;
157
+ }
158
+ .prototype-header h1 {
159
+ letter-spacing: -1px;
160
+ }
161
+ .prototype-header .desc {
162
+ color: silver;
163
+ }
164
+ /*
165
+ body.dark .browser-options-row {
166
+ border-top: 1px solid rgba(255,255,255,0.05);
167
+ border-bottom: 1px solid rgba(255,255,255,0.05);
168
+ }
169
+ */
170
+ .meta {
171
+ display: flex;
172
+ align-items: flex-start;
173
+ padding: 20px;
174
+ }
175
+ .meta-content {
176
+ padding: 10px;
177
+ }
178
+ .meta-content h2 {
179
+ margin: 0;
180
+ font-size: 30px;
181
+ }
182
+ .meta-path {
183
+ padding: 10px 0;
184
+ opacity: 0.7;
185
+ }
186
+ .meta img {
187
+ width: 100px;
188
+ }
189
+ @media only screen and (max-width: 480px) {
190
+ .btn2 {
191
+ padding: 5px;
192
+ font-size: 11px;
193
+ }
194
+ .nav-btns {
195
+ flex-grow: 1;
196
+ justify-content: center;
197
+ padding: 0;
198
+ }
199
+ }
200
+
201
+
202
+
203
+
204
+
205
+
206
+ .online {
207
+ width: 10px;
208
+ height: 10px;
209
+ background: yellowgreen;
210
+ border-radius: 10px;
211
+ }
212
+ #menu {
213
+ display: flex;
214
+ }
215
+ #menu i {
216
+ display: block;
217
+ }
218
+ #menu img {
219
+ display: none;
220
+ height: 30px;
221
+ object-fit: contain;
222
+ /*
223
+ border-radius: 20px
224
+ */
225
+ }
226
+ #menu.margin {
227
+ /*
228
+ padding: 5px;
229
+ */
230
+ }
231
+ #menu.margin i {
232
+ display: none;
233
+ }
234
+ #menu.margin img {
235
+ display: block;
236
+ }
237
+ html, body {
238
+ width: 100%;
239
+ height: 100%;
240
+ margin: 0;
241
+ }
242
+ body {
243
+ display: flex;
244
+ flex-direction: column;
245
+ }
246
+ .menu {
247
+ overflow: auto;
248
+ }
249
+ body.dark .m {
250
+ border-top: 1px solid rgba(255,255,255,0.04);
251
+ }
252
+ .m {
253
+ border-top: 1px solid rgba(0,0,0,0.04);
254
+ }
255
+ .container {
256
+ position: relative;
257
+ display: flex;
258
+ flex-direction: column;
259
+ flex-grow: 1;
260
+ }
261
+ body aside {
262
+ /*
263
+ background: var(--light-bg);
264
+ */
265
+ border-right: 1px solid rgba(0,0,0,0.04);
266
+ height: 100%;
267
+ }
268
+ body.dark aside {
269
+ background: var(--dark-bg);
270
+ border-right: 1px solid rgba(255,255,255,0.04);
271
+ }
272
+ aside {
273
+ display: flex;
274
+ flex-direction: column;
275
+ width: 200px;
276
+ overflow: auto;
277
+ box-sizing: border-box;
278
+ flex-shrink: 0;
279
+ }
280
+ main {
281
+ flex-grow: 1;
282
+ min-height: 0;
283
+ /*
284
+ height: 100%;
285
+ */
286
+ }
287
+ main iframe[name^=http] {
288
+ background: white;
289
+ }
290
+ main iframe {
291
+ width: 100%;
292
+ height: 100%;
293
+ border: none;
294
+ }
295
+ .header-item {
296
+ /*
297
+ display: block;
298
+ */
299
+ display: flex;
300
+ font-size: 12px;
301
+ text-decoration: none;
302
+ align-items: center;
303
+ border-radius: 0;
304
+ cursor: pointer;
305
+ }
306
+ .header-item.selected {
307
+ }
308
+ .header-item .btn2 {
309
+ margin: 0;
310
+ border: none;
311
+ padding: 5px;
312
+ /*
313
+ color: var(--light-color);
314
+ */
315
+ }
316
+ body.dark .header-item .btn2 {
317
+ /*
318
+ color: var(--darkt-color);
319
+ */
320
+ }
321
+ .bar .btn2 i {
322
+ display: block;
323
+ margin-right: 5px;
324
+ }
325
+ .header-item > * {
326
+ display: block;
327
+ }
328
+ .header-item img {
329
+ /*
330
+ width: 60px;
331
+ */
332
+ height: 80px;
333
+ width: 80px;
334
+ /*
335
+ border-radius: 10px;
336
+ */
337
+ object-fit: contain;
338
+ display: inline-block;
339
+ /*
340
+ border-radius: 30px;
341
+ */
342
+ }
343
+ body.dark .header-item.btn {
344
+ /*
345
+ color: white;
346
+ */
347
+ color: var(--dark-color);
348
+ }
349
+ .header-item.btn {
350
+ padding: 10px;
351
+ background: none !important;
352
+ color: var(--light-color);
353
+ }
354
+ .logo {
355
+ font-size: 20px;
356
+ padding: 20px;
357
+ }
358
+ body .logo {
359
+ color: var(--light-color);
360
+ }
361
+ body.dark .logo {
362
+ color: var(--dark-btn-color);
363
+ /*
364
+ color: white;
365
+ */
366
+ }
367
+ body #new-window {
368
+ color: var(--light-color);
369
+ }
370
+ body.dark #new-window {
371
+ color: var(--dark-btn-color);
372
+ /*
373
+ color: white;
374
+ */
375
+ }
376
+ /*
377
+ .dark .app-info {
378
+ background: rgba(255,255,255,0.04);
379
+ }
380
+ */
381
+ .app-info {
382
+
383
+ /*
384
+ display: flex;
385
+ */
386
+ box-sizing: border-box;
387
+ text-align: center;;
388
+ font-weight: bold;
389
+ align-items: center;
390
+ /*
391
+ background: rgba(0,0,0,0.04);
392
+ */
393
+ }
394
+ .folderbuttons {
395
+ display: grid;
396
+ grid-template-columns: repeat(4, 1fr);
397
+ gap: 0px;
398
+ }
399
+ .header-btns {
400
+ padding: 0 !important;
401
+ }
402
+ body.dark .header-btns {
403
+ border-top: 1px solid rgba(255,255,255,0.04);
404
+ }
405
+ .app-info-edit {
406
+ text-decoration: none;
407
+ color: black;
408
+ border-bottom: 1px solid rgba(255,255,255,0.1);
409
+ }
410
+ /*
411
+ .dark .app-info-edit {
412
+ border-top: 1px solid rgba(255,255,255,0.2);
413
+ border-bottom: 1px solid rgba(255,255,255,0.2);
414
+ }
415
+ */
416
+ .dark .app-info-edit:hover {
417
+ background: rgba(0,0,0,0.2);
418
+ }
419
+ .app-info-edit:hover{
420
+ background: rgba(0,0,0,0.05);
421
+ }
422
+ .app-info-edit i{
423
+ display: block;
424
+ }
425
+ .app-info-edit, .app-info-copy {
426
+ font-weight: normal;
427
+
428
+ /*
429
+ border-radius: 20px;
430
+ */
431
+ font-size: 12px;
432
+ padding: 15px 5px;
433
+ /*
434
+ margin: 10px 20px 0;
435
+ */
436
+ }
437
+ .app-info-card {
438
+ padding: 10px !important;
439
+ }
440
+ .app-info .btn {
441
+ width: 100%;
442
+ }
443
+ .app-info-card > * {
444
+ padding: 5px;
445
+ color: var(--light-color);
446
+ text-decoration: none;
447
+ box-sizing: border-box;
448
+ }
449
+ body.dark .app-info-card > * {
450
+ color: var(--dark-color);
451
+ }
452
+ .appcanvas {
453
+ display: flex;
454
+ flex-grow: 1;
455
+ border-top: 1px solid rgba(0, 0,0 ,0.04);
456
+ }
457
+ body.dark .appcanvas {
458
+ border-top: 1px solid rgba(255,255,255,0.04);
459
+ }
460
+
461
+ @media only screen and (max-width: 480px) {
462
+ nav .btn2 {
463
+ width: auto !important;
464
+ min-width: 40px;
465
+ border-right: none;
466
+ flex-direction: column;
467
+ }
468
+ .app-info {
469
+ display: flex;
470
+ padding: 10px;
471
+ }
472
+ .app-info img {
473
+ width: 60px;
474
+ height: 60px;
475
+ }
476
+
477
+ .header-item {
478
+ font-size: 16px;
479
+ }
480
+ aside.active {
481
+ width: 100%;
482
+ z-index: 10000000;
483
+ }
484
+ aside:not(.active) {
485
+ display: none;
486
+ }
487
+ .container {
488
+ display: none;
489
+ }
490
+ .container.active {
491
+ display: block;
492
+ position: absolute;
493
+ z-index: 10000000;
494
+ width: 100%;
495
+ height: 100%;
496
+ }
497
+ /*
498
+ .grid-btns {
499
+ display: none;
500
+ }
501
+ */
502
+ #menu {
503
+ display: none;
504
+ }
505
+ #menu-mobile {
506
+ display: flex;
507
+ }
508
+ }
509
+ body.dark .header-item.cursor.header-top {
510
+ background: none !important;
511
+ }
512
+ .header-item.cursor.header-top {
513
+ background: none !important;
514
+ }
515
+ .header-item.header-top {
516
+ display: block;
517
+ }
518
+ </style>
519
+ <script src="/hotkeys.min.js"></script>
520
+ <script src="/sweetalert2.js"></script>
521
+ <script src="/noty.js"></script>
522
+ <script src="/notyq.js"></script>
523
+ <script src="/xterm.js"></script>
524
+ <script src="/xterm-addon-fit.js"></script>
525
+ <script src="/xterm-addon-web-links.js"></script>
526
+ <script src="/xterm-theme.js"></script>
527
+ <script src="/Socket.js"></script>
528
+ <script src="/install.js"></script>
529
+ <script src="/common.js"></script>
530
+ <script src="/opener.js"></script>
531
+ <script src="/nav.js"></script>
532
+ <script src="/fuse.js"></script>
533
+ <script src="/report.js"></script>
534
+ <script src="/filepond-plugin-file-validate-type.min.js"></script>
535
+ <script src="/filepond-plugin-image-exif-orientation.min.js"></script>
536
+ <script src="/filepond-plugin-image-preview.min.js"></script>
537
+ <script src="/filepond-plugin-image-edit.min.js"></script>
538
+ <script src="/filepond-plugin-image-crop.min.js"></script>
539
+ <script src="/filepond-plugin-image-resize.min.js"></script>
540
+ <script src="/filepond-plugin-image-transform.min.js"></script>
541
+ <script src="/filepond.min.js"></script>
542
+ <script src="/commander.js"></script>
543
+ </head>
544
+ <body class='<%=theme%>'>
545
+ <header class='navheader grabbable'>
546
+ <h1>
547
+ <a class='home' href="/"><i class="fa-solid fa-house"></i></a>
548
+ <button class='btn2' id='back'><div><i class="fa-solid fa-chevron-left"></i></div><div>Prev</div></button>
549
+ <button class='btn2' id='forward'><div><i class="fa-solid fa-chevron-right"></i></div><div>Next</div></button>
550
+ <a class='btn2 create-new' id='create-new-folder'><div><i class='fa-solid fa-plus'></i></div><div>New</div></a>
551
+ <a class='btn2' id='explore' href="/?mode=explore"><div><i class="fa-solid fa-magnifying-glass"></i></div><div>Discover</div></a>
552
+ <a href="/network" class='btn2'><div><i class="fa-solid fa-wifi"></i></div><div>Network</div></a>
553
+ <a href="/connect" class='btn2'><div><i class="fa-solid fa-circle-user"></i></div><div>Connect</div></a>
554
+ <div class='flexible'></div>
555
+ <div class='nav-btns'>
556
+ <a href="/network" class='btn2'><div><i class="fa-solid fa-wifi"></i></div><div>Network</div></a>
557
+ <a class='btn2' href="<%=portal%>" target="_blank"><div><i class="fa-solid fa-question"></i></div><div>Help</div></a>
558
+ <button class='btn2' id='genlog'><div><i class="fa-solid fa-laptop-code"></i></div><div>Logs</div></button>
559
+ <a id='downloadlogs' download class='hidden btn2' href="/pinokio/logs.zip"><div><i class="fa-solid fa-download"></i></div><div>Download logs</div></a>
560
+ <a class='btn2' href="/?mode=settings"><div><i class="fa-solid fa-gear"></i></div><div>Settings</div></a>
561
+ <% if (agent === "electron") { %>
562
+ <a href="/" target="_blank" class='btn2' features="browser"><div><i class="fa-solid fa-square-up-right"></i></div><div>Open</div></a>
563
+ <% } else { %>
564
+ <a href="/" target="_blank" class='btn2'><div><i class="fa-solid fa-square-up-right"></i></div><div>Open</div></a>
565
+ <% } %>
566
+ <button id='new-window' title='open a new window' class='btn2'><div><i class="fa-solid fa-plus"></i></div><div>Window</div></button>
567
+ </div>
568
+ </h1>
569
+ </header>
570
+ <div class='appcanvas'>
571
+ <aside class='active'>
572
+ <div class='header-top header-item'>
573
+ <div class='app-info'>
574
+ <div class='app-info-card'>
575
+ <% if (config.icon) { %>
576
+ <img src="<%=config.icon%>"/>
577
+ <% } else { %>
578
+ <i class="fa-regular fa-circle-dot"></i>
579
+ <% } %>
580
+ <div><%=config.title%></div>
581
+ <div class="folderpath"><%=config.web_path%></div>
582
+ </div>
583
+ </div>
584
+ </div>
585
+ </aside>
586
+ <main>
587
+ <div class='container'>
588
+ <div class='prototype-header'>
589
+ <div>
590
+ <h1><%=title%></h1>
591
+ <div class='desc'><%=description%></div>
592
+ </div>
593
+ <div class='flexible'></div>
594
+ <a class='btn' id='download'><i class='fa-solid fa-download'></i> Download a custom prototype script</a>
595
+ </div>
596
+ <div class='folder-templates drawer'>
597
+ <% items.forEach((folder, i) => { %>
598
+ <a class='line folder' href="/prototype/show/<%=folder.id%>?path=<%=path%>">
599
+ <% if (folder.icon) { %>
600
+ <img src="<%=folder.icon%>">
601
+ <% } else { %>
602
+ <% if (theme === 'dark') { %>
603
+ <img src="/pinokio-white.png">
604
+ <% } else { %>
605
+ <img src="/pinokio-black.png">
606
+ <% } %>
607
+ <% } %>
608
+ <div class='col flexible'>
609
+ <div class='title'><%=folder.title%></div>
610
+ <div class='description'><%=folder.description%></div>
611
+ </div>
612
+ </a>
613
+ <% }) %>
614
+ </div>
615
+ </div>
616
+ </main>
617
+ </div>
618
+ <script>
619
+ let paths = location.pathname.split("/").filter(x=>x)
620
+ var term
621
+ const n = new N()
622
+ let socket = new Socket()
623
+ let list = []
624
+ document.querySelectorAll(".line").forEach((el, index) => {
625
+ list.push({
626
+ index: parseInt(el.getAttribute("data-index")),
627
+ name: el.getAttribute("data-name"),
628
+ description: el.getAttribute("data-description"),
629
+ })
630
+ })
631
+ const search = (items, value) => {
632
+ let filtered = []
633
+ for(let i=0; i<items.length; i++) {
634
+ let item = items[i]
635
+ let re = new RegExp(value, "i")
636
+ if (re.test(item.name)) {
637
+ filtered.push({ item })
638
+ } else if (re.test(item.description)) {
639
+ filtered.push({ item })
640
+ }
641
+ }
642
+ return filtered
643
+ }
644
+ </script>
645
+ </body>
646
+ </html>