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.
- package/kernel/api/index.js +0 -20
- package/kernel/api/input/index.js +2 -1
- package/kernel/api/shell/index.js +1 -1
- package/kernel/bin/index.js +0 -15
- package/kernel/index.js +9 -31
- package/kernel/loader.js +1 -0
- package/kernel/plugin.js +2 -2
- package/kernel/prototype.js +28 -23
- package/kernel/shells.js +6 -2
- package/package.json +1 -1
- package/server/index.js +111 -32
- package/server/public/fseditor.js +2 -9
- package/server/public/modalinput.js +28 -9
- package/server/public/opener.js +0 -1
- package/server/public/style.css +44 -5
- package/server/views/app.ejs +50 -40
- package/server/views/connect.ejs +96 -13
- package/server/views/network.ejs +4 -2
- package/server/views/partials/dynamic.ejs +3 -5
- package/server/views/partials/menu.ejs +1 -1
- package/server/views/prototype/index.ejs +967 -310
- package/server/views/prototype/old_index.ejs +646 -0
- package/server/views/prototype/show.ejs +11 -158
- package/server/views/settings.ejs +6 -3
|
@@ -34,12 +34,15 @@ main {
|
|
|
34
34
|
}
|
|
35
35
|
#readme {
|
|
36
36
|
border-top: 1px solid rgba(0,0,0,0.1);
|
|
37
|
-
padding: 20px;
|
|
37
|
+
padding: 20px 0;
|
|
38
38
|
margin-top: 20px;
|
|
39
39
|
}
|
|
40
40
|
#readme ol, #readme ul {
|
|
41
41
|
padding-inline-start: 18px;
|
|
42
42
|
}
|
|
43
|
+
#readme img {
|
|
44
|
+
border: 2px solid rgba(0,0,0,0.1);
|
|
45
|
+
}
|
|
43
46
|
.line2 {
|
|
44
47
|
display: flex;
|
|
45
48
|
align-items: center;
|
|
@@ -190,12 +193,18 @@ body.dark .browser-options-row {
|
|
|
190
193
|
display: flex;
|
|
191
194
|
align-items: flex-start;
|
|
192
195
|
}
|
|
196
|
+
.meta-action .btn {
|
|
197
|
+
width: 100px;
|
|
198
|
+
text-align: center;
|
|
199
|
+
}
|
|
193
200
|
.meta-action {
|
|
194
201
|
padding: 10px 0;
|
|
195
202
|
}
|
|
203
|
+
/*
|
|
196
204
|
.meta-content {
|
|
197
205
|
padding: 10px;
|
|
198
206
|
}
|
|
207
|
+
*/
|
|
199
208
|
.meta-content h2 {
|
|
200
209
|
margin: 0;
|
|
201
210
|
font-size: 30px;
|
|
@@ -565,84 +574,13 @@ body.dark .header-item.cursor.header-top {
|
|
|
565
574
|
<script src="/commander.js"></script>
|
|
566
575
|
</head>
|
|
567
576
|
<body class='<%=theme%>'>
|
|
568
|
-
<header class='navheader grabbable'>
|
|
569
|
-
<h1>
|
|
570
|
-
<a class='home' href="/"><i class="fa-solid fa-house"></i></a>
|
|
571
|
-
<button class='btn2' id='back'><div><i class="fa-solid fa-chevron-left"></i></div><div>Prev</div></button>
|
|
572
|
-
<button class='btn2' id='forward'><div><i class="fa-solid fa-chevron-right"></i></div><div>Next</div></button>
|
|
573
|
-
<a class='btn2 create-new' id='create-new-folder'><div><i class='fa-solid fa-plus'></i></div><div>New</div></a>
|
|
574
|
-
<a class='btn2' id='explore' href="/?mode=explore"><div><i class="fa-solid fa-magnifying-glass"></i></div><div>Discover</div></a>
|
|
575
|
-
<a href="/network" class='btn2'><div><i class="fa-solid fa-wifi"></i></div><div>Network</div></a>
|
|
576
|
-
<a href="/connect" class='btn2'><div><i class="fa-solid fa-circle-user"></i></div><div>Connect</div></a>
|
|
577
|
-
<div class='flexible'></div>
|
|
578
|
-
<div class='nav-btns'>
|
|
579
|
-
<a href="/network" class='btn2'><div><i class="fa-solid fa-wifi"></i></div><div>Network</div></a>
|
|
580
|
-
<a class='btn2' href="<%=portal%>" target="_blank"><div><i class="fa-solid fa-question"></i></div><div>Help</div></a>
|
|
581
|
-
<button class='btn2' id='genlog'><div><i class="fa-solid fa-laptop-code"></i></div><div>Logs</div></button>
|
|
582
|
-
<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>
|
|
583
|
-
<a class='btn2' href="/?mode=settings"><div><i class="fa-solid fa-gear"></i></div><div>Settings</div></a>
|
|
584
|
-
<% if (agent === "electron") { %>
|
|
585
|
-
<a href="/" target="_blank" class='btn2' features="browser"><div><i class="fa-solid fa-square-up-right"></i></div><div>Open</div></a>
|
|
586
|
-
<% } else { %>
|
|
587
|
-
<a href="/" target="_blank" class='btn2'><div><i class="fa-solid fa-square-up-right"></i></div><div>Open</div></a>
|
|
588
|
-
<% } %>
|
|
589
|
-
<button id='new-window' title='open a new window' class='btn2'><div><i class="fa-solid fa-plus"></i></div><div>Window</div></button>
|
|
590
|
-
</div>
|
|
591
|
-
</h1>
|
|
592
|
-
</header>
|
|
593
577
|
<div class='appcanvas'>
|
|
594
|
-
<aside class='active'>
|
|
595
|
-
<div class='header-top header-item'>
|
|
596
|
-
<div class='app-info'>
|
|
597
|
-
<div class='app-info-card'>
|
|
598
|
-
<% if (config.icon) { %>
|
|
599
|
-
<img src="<%=config.icon%>"/>
|
|
600
|
-
<% } else { %>
|
|
601
|
-
<i class="fa-regular fa-circle-dot"></i>
|
|
602
|
-
<% } %>
|
|
603
|
-
<div><%=config.title%></div>
|
|
604
|
-
<div class="folderpath"><%=config.web_path%></div>
|
|
605
|
-
</div>
|
|
606
|
-
</div>
|
|
607
|
-
</div>
|
|
608
|
-
</aside>
|
|
609
578
|
<main>
|
|
610
|
-
<!--
|
|
611
|
-
<div class='prototype-header'>
|
|
612
|
-
<div class='filepond-wrapper'>
|
|
613
|
-
<div class='avatar-field'>
|
|
614
|
-
<input id='new-folder-image' type="file" class="filepond" name="avatar" accept="image/png, image/jpeg, image/gif" />
|
|
615
|
-
</div>
|
|
616
|
-
<div class='folder-rows'>
|
|
617
|
-
<div class='folder-row'>
|
|
618
|
-
<label for='new-folder-path'>Folder Path</label>
|
|
619
|
-
<div class='field-row'>
|
|
620
|
-
<input id="new-folder-path" placeholder="Folder Path" autofocus />
|
|
621
|
-
</div>
|
|
622
|
-
</div>
|
|
623
|
-
<div class='folder-row'>
|
|
624
|
-
<label for='new-folder-title'>Title (optional)</label>
|
|
625
|
-
<input id="new-folder-title" placeholder="Enter the display name" />
|
|
626
|
-
</div>
|
|
627
|
-
<div class='folder-row'>
|
|
628
|
-
<label for='new-folder-description'>Description (optional)</label>
|
|
629
|
-
<textarea id="new-folder-description" placeholder="Enter the project description"></textarea>
|
|
630
|
-
</div>
|
|
631
|
-
</div>
|
|
632
|
-
</div>
|
|
633
|
-
<div class='footer'>
|
|
634
|
-
<button class='btn' id='create'>Create</button>
|
|
635
|
-
</div>
|
|
636
|
-
</div>
|
|
637
|
-
-->
|
|
638
579
|
<div class='doc'>
|
|
639
580
|
<div class='meta'>
|
|
640
|
-
<img src="<%=icon%>">
|
|
641
581
|
<div class='meta-content'>
|
|
642
|
-
<h2><%=title%></h2>
|
|
643
|
-
<div class='meta-description'><%=description%></div>
|
|
644
582
|
<div class='meta-action'>
|
|
645
|
-
<a href="
|
|
583
|
+
<a href="<%=run_path%>%>" class='btn'><i class="fa-solid fa-play"></i> Run</a>
|
|
646
584
|
</div>
|
|
647
585
|
</div>
|
|
648
586
|
</div>
|
|
@@ -651,91 +589,6 @@ body.dark .header-item.cursor.header-top {
|
|
|
651
589
|
</main>
|
|
652
590
|
</div>
|
|
653
591
|
<script>
|
|
654
|
-
/*
|
|
655
|
-
let textareas = document.querySelectorAll("textarea")
|
|
656
|
-
for(let textarea of textareas) {
|
|
657
|
-
textarea.style.height = 'auto';
|
|
658
|
-
textarea.style.height = textarea.scrollHeight + 'px';
|
|
659
|
-
textarea.addEventListener('input', () => {
|
|
660
|
-
textarea.style.height = textarea.scrollHeight + 'px';
|
|
661
|
-
});
|
|
662
|
-
}
|
|
663
|
-
const input = document.querySelector("#new-folder-path")
|
|
664
|
-
input.focus()
|
|
665
|
-
FilePond.registerPlugin(
|
|
666
|
-
FilePondPluginFileValidateType,
|
|
667
|
-
FilePondPluginImageExifOrientation,
|
|
668
|
-
FilePondPluginImagePreview,
|
|
669
|
-
FilePondPluginImageCrop,
|
|
670
|
-
FilePondPluginImageResize,
|
|
671
|
-
FilePondPluginImageTransform,
|
|
672
|
-
FilePondPluginImageEdit
|
|
673
|
-
);
|
|
674
|
-
let path
|
|
675
|
-
let title
|
|
676
|
-
let description
|
|
677
|
-
let pond = FilePond.create(
|
|
678
|
-
document.querySelector('#new-folder-image'),
|
|
679
|
-
{
|
|
680
|
-
credits: false,
|
|
681
|
-
allowReplace: true,
|
|
682
|
-
allowRevert: true,
|
|
683
|
-
allowRemove: true,
|
|
684
|
-
|
|
685
|
-
allowImageCrop: true,
|
|
686
|
-
allowImageEdit: true,
|
|
687
|
-
allowImageTransform: true,
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
labelIdle: `Drag & Drop your picture or <span class="filepond--label-action">Browse</span>`,
|
|
691
|
-
// imagePreviewHeight: 170,
|
|
692
|
-
imageCropAspectRatio: '1:1',
|
|
693
|
-
// imageResizeTargetWidth: 200,
|
|
694
|
-
// imageResizeTargetHeight: 200,
|
|
695
|
-
imageTransformOutputMimeType: 'image/png',
|
|
696
|
-
// stylePanelLayout: 'compact circle',
|
|
697
|
-
instantUpload: false,
|
|
698
|
-
server: {
|
|
699
|
-
process: {
|
|
700
|
-
url: '/new',
|
|
701
|
-
onerror: (response) => {
|
|
702
|
-
let err = JSON.parse(response)
|
|
703
|
-
alert(err.error)
|
|
704
|
-
},
|
|
705
|
-
ondata: (formData) => {
|
|
706
|
-
// set folder path
|
|
707
|
-
let folder_path_el = document.querySelector('#new-folder-path')
|
|
708
|
-
let folder_title_el = document.querySelector('#new-folder-title')
|
|
709
|
-
let folder_description_el = document.querySelector('#new-folder-description')
|
|
710
|
-
path = folder_path_el.value
|
|
711
|
-
title = folder_title_el.value || path
|
|
712
|
-
description = folder_description_el.value || ""
|
|
713
|
-
formData.append("path", path)
|
|
714
|
-
formData.append("title", title)
|
|
715
|
-
formData.append("description", description)
|
|
716
|
-
debugger
|
|
717
|
-
return formData;
|
|
718
|
-
}
|
|
719
|
-
}
|
|
720
|
-
},
|
|
721
|
-
onprocessfile(error, file) {
|
|
722
|
-
console.log({ file })
|
|
723
|
-
if (!error) {
|
|
724
|
-
location.href = `/prototype/run/<%=prototype_path%>?path=${path}`
|
|
725
|
-
}
|
|
726
|
-
},
|
|
727
|
-
files: [
|
|
728
|
-
{
|
|
729
|
-
type: 'local',
|
|
730
|
-
source: '/pinokio-black.png',
|
|
731
|
-
}
|
|
732
|
-
]
|
|
733
|
-
}
|
|
734
|
-
);
|
|
735
|
-
document.querySelector("#create").addEventListener("click", async (e) => {
|
|
736
|
-
pond.processFile()
|
|
737
|
-
})
|
|
738
|
-
*/
|
|
739
592
|
</script>
|
|
740
593
|
</body>
|
|
741
594
|
</html>
|
|
@@ -86,8 +86,8 @@ body.dark .item {
|
|
|
86
86
|
}
|
|
87
87
|
.titleview h1 {
|
|
88
88
|
word-break: break-word;
|
|
89
|
-
font-size:
|
|
90
|
-
|
|
89
|
+
font-size: 40px;
|
|
90
|
+
font-weight: lighter;
|
|
91
91
|
margin-bottom: 10px;
|
|
92
92
|
}
|
|
93
93
|
.item > .d {
|
|
@@ -224,10 +224,13 @@ hr {
|
|
|
224
224
|
display: inline-block;
|
|
225
225
|
cursor: pointer;
|
|
226
226
|
}
|
|
227
|
+
body.dark .keys pre {
|
|
228
|
+
background: rgba(255,255,255,0.02) !important;
|
|
229
|
+
}
|
|
227
230
|
.keys pre {
|
|
228
231
|
padding: 20px;
|
|
229
232
|
margin: 20px 0;
|
|
230
|
-
background: rgba(0,0,
|
|
233
|
+
background: rgba(0,0,100,0.04) !important;
|
|
231
234
|
}
|
|
232
235
|
</style>
|
|
233
236
|
<script src="/hotkeys.min.js"></script>
|