pinokiod 3.24.0 → 3.25.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/api/exec/index.js +67 -0
- package/kernel/api/index.js +1 -0
- package/kernel/plugin.js +24 -41
- package/kernel/prototype.js +23 -0
- package/kernel/router/index.js +13 -0
- package/kernel/router/localhost_home_router.js +11 -0
- package/kernel/shell.js +13 -10
- package/kernel/shells.js +52 -47
- package/package.json +2 -1
- package/server/index.js +191 -169
- package/server/public/style.css +1 -1
- package/server/socket.js +0 -19
- package/server/views/app.ejs +45 -11
- package/server/views/d.ejs +71 -12
- package/server/views/index.ejs +69 -1
- package/server/views/init/index.ejs +248 -87
- package/server/views/net.ejs +0 -1
- package/server/views/network.ejs +3 -2
- package/server/views/partials/dynamic.ejs +1 -1
- package/server/views/start.ejs +233 -0
package/server/views/app.ejs
CHANGED
|
@@ -178,7 +178,10 @@ body.dark .header-item.btn {
|
|
|
178
178
|
color: var(--dark-color);
|
|
179
179
|
}
|
|
180
180
|
.header-item.btn {
|
|
181
|
+
/*
|
|
181
182
|
padding: 5px 8px;
|
|
183
|
+
*/
|
|
184
|
+
padding: 7px;
|
|
182
185
|
background: none !important;
|
|
183
186
|
color: var(--light-color);
|
|
184
187
|
}
|
|
@@ -615,7 +618,17 @@ nav .logo {
|
|
|
615
618
|
font-size: 20px;
|
|
616
619
|
padding: 10px 30px;
|
|
617
620
|
}
|
|
621
|
+
.error-message > div {
|
|
622
|
+
width: 500px;
|
|
623
|
+
}
|
|
618
624
|
.error-message {
|
|
625
|
+
width: 100%;
|
|
626
|
+
background: royalblue !important;
|
|
627
|
+
color: white;
|
|
628
|
+
display: flex;
|
|
629
|
+
justify-content: center;
|
|
630
|
+
align-items: center;
|
|
631
|
+
/*
|
|
619
632
|
display: flex;
|
|
620
633
|
flex-direction: column;
|
|
621
634
|
justify-content: center;
|
|
@@ -628,6 +641,7 @@ nav .logo {
|
|
|
628
641
|
line-height: 40px;
|
|
629
642
|
color: black;
|
|
630
643
|
letter-spacing: -2px;
|
|
644
|
+
*/
|
|
631
645
|
}
|
|
632
646
|
body.dark #location {
|
|
633
647
|
color: white;
|
|
@@ -752,11 +766,15 @@ body.dark .submenu {
|
|
|
752
766
|
overflow: auto;
|
|
753
767
|
display: flex;
|
|
754
768
|
flex-grow: 1;
|
|
769
|
+
/*
|
|
755
770
|
border-top: 1px solid rgba(0, 0,0 ,0.04);
|
|
771
|
+
*/
|
|
756
772
|
}
|
|
773
|
+
/*
|
|
757
774
|
body.dark .appcanvas {
|
|
758
775
|
border-top: 1px solid rgba(255,255,255,0.04);
|
|
759
776
|
}
|
|
777
|
+
*/
|
|
760
778
|
.filler {
|
|
761
779
|
display: none;
|
|
762
780
|
}
|
|
@@ -792,19 +810,34 @@ body.dark .top-menu .btn2.selected {
|
|
|
792
810
|
color: white;
|
|
793
811
|
}
|
|
794
812
|
body.minimized #collapse {
|
|
813
|
+
/*
|
|
795
814
|
background: none !important;
|
|
815
|
+
*/
|
|
816
|
+
border: none !important;
|
|
796
817
|
}
|
|
797
818
|
body.dark #collapse {
|
|
819
|
+
border-bottom: 4px solid white;
|
|
820
|
+
/*
|
|
798
821
|
background: rgba(255,255,255,0.07);
|
|
822
|
+
*/
|
|
799
823
|
}
|
|
800
824
|
#collapse {
|
|
825
|
+
border-bottom: 4px solid black;
|
|
826
|
+
/*
|
|
801
827
|
background: rgba(0,0,0,0.04);
|
|
828
|
+
*/
|
|
802
829
|
}
|
|
803
830
|
body.dark .mode-selector .btn2.selected {
|
|
831
|
+
/*
|
|
804
832
|
background: rgba(255,255,255,0.07);
|
|
833
|
+
*/
|
|
834
|
+
border-bottom: 4px solid white;
|
|
805
835
|
}
|
|
806
836
|
.mode-selector .btn2.selected {
|
|
837
|
+
border-bottom: 4px solid black;
|
|
838
|
+
/*
|
|
807
839
|
background: rgba(0,0,0,0.04);
|
|
840
|
+
*/
|
|
808
841
|
}
|
|
809
842
|
.mode-selector {
|
|
810
843
|
display: flex;
|
|
@@ -1024,9 +1057,12 @@ body.dark .mode-selector .btn2.selected {
|
|
|
1024
1057
|
<% } %>
|
|
1025
1058
|
</div>
|
|
1026
1059
|
<% } %>
|
|
1027
|
-
|
|
1028
|
-
<
|
|
1029
|
-
|
|
1060
|
+
<%if (type!=='run') { %>
|
|
1061
|
+
<a id='devtab' data-mode="refresh" target="<%=dev_link%>" href="<%=dev_link%>" class="btn header-item frame-link selected">
|
|
1062
|
+
<div class="tab"><i class="fa-solid fa-keyboard"></i> Build</div>
|
|
1063
|
+
<div class='loader'><i class='fa-solid fa-angle-right'></i></div>
|
|
1064
|
+
</a>
|
|
1065
|
+
<% } %>
|
|
1030
1066
|
<div class="dynamic <%=type==='run' ? '' : 'selected'%>">
|
|
1031
1067
|
<div class='submenu'>
|
|
1032
1068
|
<% if (plugin_menu) { %>
|
|
@@ -1051,7 +1087,7 @@ body.dark .mode-selector .btn2.selected {
|
|
|
1051
1087
|
<% if (type === "browse") { %>
|
|
1052
1088
|
<div class='nested-menu selected git blue'>
|
|
1053
1089
|
<div class='btn header-item frame-link reveal'>
|
|
1054
|
-
<div class='tab'><i class="fa-solid fa-clock-rotate-left"></i> Version
|
|
1090
|
+
<div class='tab'><i class="fa-solid fa-clock-rotate-left"></i> Version History</div>
|
|
1055
1091
|
<div class='loader'><i class="fa-solid fa-angle-down"></i><i class="fa-solid fa-angle-up hidden"></i></div>
|
|
1056
1092
|
</div>
|
|
1057
1093
|
<div class='submenu' id='git-repos'>
|
|
@@ -1124,9 +1160,10 @@ body.dark .mode-selector .btn2.selected {
|
|
|
1124
1160
|
</aside>
|
|
1125
1161
|
<% if (error) { %>
|
|
1126
1162
|
<div class='error-message'>
|
|
1127
|
-
<
|
|
1128
|
-
|
|
1129
|
-
|
|
1163
|
+
<div>
|
|
1164
|
+
<h1>Error</h1>
|
|
1165
|
+
<div><%=error%></div>
|
|
1166
|
+
</div>
|
|
1130
1167
|
</div>
|
|
1131
1168
|
<% } else { %>
|
|
1132
1169
|
<div class='container'>
|
|
@@ -1855,7 +1892,6 @@ body.dark .mode-selector .btn2.selected {
|
|
|
1855
1892
|
}
|
|
1856
1893
|
})
|
|
1857
1894
|
document.querySelector("aside").addEventListener("click", async (e) => {
|
|
1858
|
-
console.log("ASIDE CLICK")
|
|
1859
1895
|
let target
|
|
1860
1896
|
|
|
1861
1897
|
// 0. handle dropdowns
|
|
@@ -2014,7 +2050,6 @@ body.dark .mode-selector .btn2.selected {
|
|
|
2014
2050
|
} else {
|
|
2015
2051
|
target = e.target.closest(".frame-link")
|
|
2016
2052
|
}
|
|
2017
|
-
console.log( { target })
|
|
2018
2053
|
|
|
2019
2054
|
|
|
2020
2055
|
|
|
@@ -2109,7 +2144,6 @@ body.dark .mode-selector .btn2.selected {
|
|
|
2109
2144
|
document.querySelectorAll(".frame-link").forEach((el) => {
|
|
2110
2145
|
el.classList.remove("selected")
|
|
2111
2146
|
})
|
|
2112
|
-
console.log("SELECTED")
|
|
2113
2147
|
target.classList.add("selected")
|
|
2114
2148
|
|
|
2115
2149
|
renderSelection(e)
|
|
@@ -2342,7 +2376,7 @@ body.dark .mode-selector .btn2.selected {
|
|
|
2342
2376
|
}).then((res) => {
|
|
2343
2377
|
console.log("STATE", res)
|
|
2344
2378
|
let selection
|
|
2345
|
-
if (res.selected) {
|
|
2379
|
+
if (res && res.selected) {
|
|
2346
2380
|
selection = document.querySelector(`[href='${res.selected}']`)
|
|
2347
2381
|
} else {
|
|
2348
2382
|
selection = document.querySelector("#devtab")
|
package/server/views/d.ejs
CHANGED
|
@@ -20,7 +20,9 @@ main {
|
|
|
20
20
|
width: 100%;
|
|
21
21
|
box-sizing: border-box;
|
|
22
22
|
display: flex;
|
|
23
|
+
/*
|
|
23
24
|
flex-wrap: wrap;
|
|
25
|
+
*/
|
|
24
26
|
padding: 20px;
|
|
25
27
|
/*
|
|
26
28
|
justify-content: center;
|
|
@@ -29,8 +31,8 @@ main {
|
|
|
29
31
|
.tab-content {
|
|
30
32
|
display: flex;
|
|
31
33
|
flex-wrap: wrap;
|
|
32
|
-
gap:
|
|
33
|
-
padding: 10px
|
|
34
|
+
gap: 15px;
|
|
35
|
+
padding: 10px 0px 0;
|
|
34
36
|
}
|
|
35
37
|
.submenu.tab {
|
|
36
38
|
margin: 10px 0;
|
|
@@ -41,7 +43,10 @@ main {
|
|
|
41
43
|
}
|
|
42
44
|
*/
|
|
43
45
|
.tab {
|
|
46
|
+
/*
|
|
44
47
|
min-width: 250px;
|
|
48
|
+
*/
|
|
49
|
+
width: 100%;
|
|
45
50
|
text-decoration: none;
|
|
46
51
|
display: flex;
|
|
47
52
|
/*
|
|
@@ -51,10 +56,9 @@ main {
|
|
|
51
56
|
font-weight: bold;
|
|
52
57
|
color: black;
|
|
53
58
|
overflow: hidden;
|
|
54
|
-
margin: 10px;
|
|
55
59
|
box-sizing: border-box;
|
|
56
|
-
border-radius:
|
|
57
|
-
align-items:
|
|
60
|
+
border-radius: 10px;
|
|
61
|
+
align-items: flex-start;
|
|
58
62
|
padding: 10px 15px;
|
|
59
63
|
/*
|
|
60
64
|
width: 120px;
|
|
@@ -70,7 +74,9 @@ body.dark .tab {
|
|
|
70
74
|
background: rgba(255,255,255,0.03);
|
|
71
75
|
}
|
|
72
76
|
.tab h2 {
|
|
77
|
+
/*
|
|
73
78
|
padding: 5px 2px 10px;
|
|
79
|
+
*/
|
|
74
80
|
/*
|
|
75
81
|
text-align: center;
|
|
76
82
|
*/
|
|
@@ -88,7 +94,7 @@ body.dark .tab {
|
|
|
88
94
|
color: black;
|
|
89
95
|
display: flex;
|
|
90
96
|
justify-content: center;
|
|
91
|
-
font-size:
|
|
97
|
+
font-size: 30px;
|
|
92
98
|
align-items: center;
|
|
93
99
|
border-radius: 3px;
|
|
94
100
|
}
|
|
@@ -117,39 +123,74 @@ body.dark .tab i {
|
|
|
117
123
|
}
|
|
118
124
|
*/
|
|
119
125
|
.menu-container {
|
|
120
|
-
|
|
126
|
+
/*
|
|
127
|
+
border: 15px solid rgba(0,0,0,0.04);
|
|
121
128
|
background: white;
|
|
129
|
+
border-radius: 20px;
|
|
130
|
+
*/
|
|
122
131
|
}
|
|
132
|
+
/*
|
|
123
133
|
body.dark .menu-container {
|
|
124
134
|
background: rgba(255,255,255,0.03);
|
|
125
135
|
}
|
|
136
|
+
*/
|
|
126
137
|
.menu-container {
|
|
127
138
|
width: 100%;
|
|
128
139
|
box-sizing: border-box;
|
|
129
140
|
margin: 20px;
|
|
130
141
|
}
|
|
131
142
|
body.dark .tab-header {
|
|
143
|
+
/*
|
|
132
144
|
background: rgba(0,0,0,0.3);
|
|
145
|
+
*/
|
|
146
|
+
/*
|
|
147
|
+
border-left: 10px solid white;
|
|
148
|
+
*/
|
|
133
149
|
}
|
|
134
150
|
.tab-header {
|
|
151
|
+
padding: 0 5px;
|
|
152
|
+
/*
|
|
135
153
|
background: rgba(0,0,0,0.04);
|
|
136
|
-
|
|
154
|
+
*/
|
|
155
|
+
/*
|
|
156
|
+
padding: 8px 10px;
|
|
157
|
+
*/
|
|
137
158
|
font-weight: bold;
|
|
159
|
+
/*
|
|
160
|
+
border-left: 10px solid black;
|
|
161
|
+
*/
|
|
138
162
|
}
|
|
139
163
|
.container {
|
|
140
164
|
margin: 0;
|
|
141
165
|
padding: 0 !important;
|
|
142
166
|
}
|
|
167
|
+
.subtitle {
|
|
168
|
+
font-size: 12px;
|
|
169
|
+
opacity: 0.6;
|
|
170
|
+
padding: 2px;
|
|
171
|
+
}
|
|
143
172
|
.btns {
|
|
144
173
|
display: flex;
|
|
174
|
+
padding-top: 10px;
|
|
175
|
+
gap: 5px;
|
|
145
176
|
}
|
|
146
177
|
body.dark .btn {
|
|
147
178
|
background: rgba(255,255,255,0.08);
|
|
179
|
+
color: white;
|
|
180
|
+
border: none;
|
|
148
181
|
}
|
|
149
182
|
.btn {
|
|
150
183
|
padding: 7px 10px;
|
|
184
|
+
background: none;
|
|
185
|
+
background: rgba(0,0,0,0.08);
|
|
186
|
+
color: rgba(0,0,0,0.7);
|
|
187
|
+
/*
|
|
188
|
+
border: 1px solid rgba(0,0,0,0.4);
|
|
189
|
+
*/
|
|
190
|
+
border-radius: 30px;
|
|
191
|
+
/*
|
|
151
192
|
background: rgba(0,0,0,0.8);
|
|
152
|
-
|
|
193
|
+
*/
|
|
153
194
|
}
|
|
154
195
|
.btn.run-btn {
|
|
155
196
|
flex-grow: 1;
|
|
@@ -159,6 +200,13 @@ body.dark .btn {
|
|
|
159
200
|
background: royalblue !important;
|
|
160
201
|
*/
|
|
161
202
|
}
|
|
203
|
+
.tab-header h3 {
|
|
204
|
+
margin: 0;
|
|
205
|
+
font-size: 16px;
|
|
206
|
+
}
|
|
207
|
+
.tab-header h3 i {
|
|
208
|
+
font-size: 18px;
|
|
209
|
+
}
|
|
162
210
|
</style>
|
|
163
211
|
<script src="/hotkeys.min.js"></script>
|
|
164
212
|
<script src="/sweetalert2.js"></script>
|
|
@@ -171,7 +219,12 @@ body.dark .btn {
|
|
|
171
219
|
<% dynamic.forEach((item, index) => { %>
|
|
172
220
|
<% if (item.menu) { %>
|
|
173
221
|
<div class='menu-container'>
|
|
174
|
-
<div class='tab-header'
|
|
222
|
+
<div class='tab-header'>
|
|
223
|
+
<h3><i class='<%=item.icon%>'></i> <%=item.title%></h3>
|
|
224
|
+
<% if (item.subtitle) { %>
|
|
225
|
+
<div class='subtitle'><%=item.subtitle%></div>
|
|
226
|
+
<% } %>
|
|
227
|
+
</div>
|
|
175
228
|
<div class='tab-content'>
|
|
176
229
|
<% item.menu.forEach((i) => { %>
|
|
177
230
|
<div class='tab'>
|
|
@@ -182,8 +235,11 @@ body.dark .btn {
|
|
|
182
235
|
<% } %>
|
|
183
236
|
<div class='col'>
|
|
184
237
|
<h2><%=i.title%></h1>
|
|
238
|
+
<% if (i.subtitle) { %>
|
|
239
|
+
<div class='subtitle'><%=i.subtitle%></div>
|
|
240
|
+
<% } %>
|
|
185
241
|
<div class='btns'>
|
|
186
|
-
<a class='run-btn btn' href="<%=i.href%>"><i class="fa-solid fa-play"></i>
|
|
242
|
+
<a class='run-btn btn' href="<%=i.href%>"><i class="fa-solid <%=i.type === "Start" ? 'fa-play' : 'fa-rocket'%>"></i> <%=i.type%></a>
|
|
187
243
|
<a class='btn' target="_blank" href="<%=i.link%>"><i class="fa-solid fa-question"></i></a>
|
|
188
244
|
</div>
|
|
189
245
|
</div>
|
|
@@ -196,8 +252,11 @@ body.dark .btn {
|
|
|
196
252
|
<img src="<%=item.image%>">
|
|
197
253
|
<div class='col'>
|
|
198
254
|
<h2><%=item.title%></h1>
|
|
255
|
+
<% if (item.subtitle) { %>
|
|
256
|
+
<div class='subtitle'><%=item.subtitle%></div>
|
|
257
|
+
<% } %>
|
|
199
258
|
<div class='btns'>
|
|
200
|
-
<a class='run-btn btn' href="<%=item.href%>"><i class="fa-solid fa-play"></i>
|
|
259
|
+
<a class='run-btn btn' href="<%=item.href%>"><i class="fa-solid <%=item.type === "Start" ? 'fa-play' : 'fa-rocket'%>"></i> <%=item.type%></a>
|
|
201
260
|
<a class='btn' target="_blank" href="<%=item.link%>"><i class="fa-solid fa-question"></i></a>
|
|
202
261
|
</div>
|
|
203
262
|
</div>
|
package/server/views/index.ejs
CHANGED
|
@@ -18,6 +18,35 @@
|
|
|
18
18
|
<link href="/electron.css" rel="stylesheet"/>
|
|
19
19
|
<% } %>
|
|
20
20
|
<style>
|
|
21
|
+
.bubble {
|
|
22
|
+
position: relative;
|
|
23
|
+
background: rgba(0,0,0,0.1);
|
|
24
|
+
color: #333;
|
|
25
|
+
border-radius: 10px;
|
|
26
|
+
padding: 10px 15px;
|
|
27
|
+
font-size: 14px;
|
|
28
|
+
flex-grow: 1;
|
|
29
|
+
line-height: 1.4;
|
|
30
|
+
margin: 0 10px;
|
|
31
|
+
font-weight: bold;
|
|
32
|
+
}
|
|
33
|
+
/* Left-side tail */
|
|
34
|
+
.bubble::before {
|
|
35
|
+
content: "";
|
|
36
|
+
position: absolute;
|
|
37
|
+
top: 10px; /* Vertical alignment of the tail */
|
|
38
|
+
left: -20px; /* Positioning outside the bubble */
|
|
39
|
+
border-width: 10px;
|
|
40
|
+
border-style: solid;
|
|
41
|
+
border-color: transparent rgba(0,0,0,0.1) transparent transparent;
|
|
42
|
+
}
|
|
43
|
+
body.dark .bubble {
|
|
44
|
+
background: rgba(0,0,0,0.4);
|
|
45
|
+
color: white;
|
|
46
|
+
}
|
|
47
|
+
body.dark .bubble:before {
|
|
48
|
+
border-color: transparent rgba(0,0,0,0.4) transparent transparent;
|
|
49
|
+
}
|
|
21
50
|
.line2 {
|
|
22
51
|
display: flex;
|
|
23
52
|
align-items: center;
|
|
@@ -253,11 +282,33 @@ aside .tab.selected {
|
|
|
253
282
|
font-weight: bold;
|
|
254
283
|
opacity: 1;
|
|
255
284
|
}
|
|
285
|
+
#suggestion {
|
|
286
|
+
padding: 20px;
|
|
287
|
+
display: flex;
|
|
288
|
+
align-items: center;
|
|
289
|
+
}
|
|
290
|
+
#suggestion img {
|
|
291
|
+
width: 50px;
|
|
292
|
+
height: 50px;
|
|
293
|
+
}
|
|
294
|
+
#suggestion h4 {
|
|
295
|
+
margin: 0;
|
|
296
|
+
}
|
|
297
|
+
/*
|
|
298
|
+
#suggestion .prompt {
|
|
299
|
+
padding: 10px 15px;
|
|
300
|
+
margin: 10px 0;
|
|
301
|
+
border-left: 10px solid rgba(0,0,0,0.1);
|
|
302
|
+
}
|
|
303
|
+
*/
|
|
256
304
|
body.dark aside .current.selected {
|
|
257
305
|
/*
|
|
258
306
|
border-left: 10px solid white;
|
|
259
307
|
*/
|
|
260
308
|
}
|
|
309
|
+
.container {
|
|
310
|
+
margin-right: 20px;
|
|
311
|
+
}
|
|
261
312
|
@media only screen and (max-width: 480px) {
|
|
262
313
|
.btn2 {
|
|
263
314
|
padding: 5px;
|
|
@@ -380,7 +431,6 @@ body.dark aside .current.selected {
|
|
|
380
431
|
<a href="/net/<%=name%>" class='submenu tab'><i class="fa-brands fa-<%=brands[platform]%>"></i> <%=name%> (<%=current_host === host ? 'this machine' : host%>)</a>
|
|
381
432
|
<% }) %>
|
|
382
433
|
<% } %>
|
|
383
|
-
<div class='tab'><i class="fa-solid fa-code"></i> Dev</div>
|
|
384
434
|
</aside>
|
|
385
435
|
<div class='container'>
|
|
386
436
|
<% if (ishome) { %>
|
|
@@ -401,6 +451,13 @@ body.dark aside .current.selected {
|
|
|
401
451
|
</form>
|
|
402
452
|
<% } %>
|
|
403
453
|
<% if (ishome) { %>
|
|
454
|
+
<!--
|
|
455
|
+
<div id='suggestion' class='hidden'>
|
|
456
|
+
<img src="/pinokio-black.png"/>
|
|
457
|
+
<div class='bubble prompt'></div>
|
|
458
|
+
<button id='create-ai' class='btn'>Create</button>
|
|
459
|
+
</div>
|
|
460
|
+
-->
|
|
404
461
|
<% if (running.length > 0) { %>
|
|
405
462
|
<div class='running-apps'>
|
|
406
463
|
<% running.forEach((item) => { %>
|
|
@@ -758,7 +815,18 @@ const renderSearch = () => {
|
|
|
758
815
|
}
|
|
759
816
|
}
|
|
760
817
|
|
|
818
|
+
// suggest(target.value)
|
|
819
|
+
|
|
761
820
|
}
|
|
821
|
+
//const suggest = (str) => {
|
|
822
|
+
// // suggestion
|
|
823
|
+
// if (str.length > 0) {
|
|
824
|
+
// document.querySelector("#suggestion").classList.remove("hidden")
|
|
825
|
+
// } else {
|
|
826
|
+
// document.querySelector("#suggestion").classList.add("hidden")
|
|
827
|
+
// }
|
|
828
|
+
// document.querySelector("#suggestion .prompt").innerHTML = str
|
|
829
|
+
//}
|
|
762
830
|
|
|
763
831
|
renderSearch()
|
|
764
832
|
|