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.
@@ -53,6 +53,40 @@
53
53
  */
54
54
  --dark-btn-color: whitesmoke;
55
55
  }
56
+ .type-tabs {
57
+ display: flex;
58
+ padding: 20px 20px 0;
59
+ /*
60
+ background: rgba(0,0,0,0.05);
61
+ */
62
+ }
63
+ .type-tab {
64
+ display: flex;
65
+ align-items: center;
66
+ padding: 10px 20px;
67
+ text-decoration: none;
68
+ color: black;
69
+ margin-right: 10px;
70
+ }
71
+ .type-tab.selected {
72
+ background: rgba(0,0,100,0.04);
73
+ }
74
+ body.dark .type-tab {
75
+ background: none;
76
+ color: white;
77
+ }
78
+ body.dark .type-tab.selected {
79
+ background: rgba(255,255,255,0.03);
80
+ }
81
+ body.dark .type-tabs {
82
+ /*
83
+ background: rgba(255,255,255,0.05);
84
+ */
85
+ }
86
+ .type-tab img {
87
+ height: 20px;
88
+ margin-right: 5px;
89
+ }
56
90
  .navheader {
57
91
  padding: 15px 10px;
58
92
  }
@@ -920,7 +954,10 @@ body.dark .line:hover {
920
954
  .line {
921
955
  text-decoration: none;
922
956
  display: block;
957
+ /*
923
958
  padding: 15px 15px;
959
+ */
960
+ padding: 10px;
924
961
  border-bottom: 1px solid var(--light-thin);
925
962
  }
926
963
  .thick.line {
@@ -968,8 +1005,12 @@ body.dark .line i {
968
1005
  text-align: center;
969
1006
  }
970
1007
  .line img {
1008
+ /*
971
1009
  width: 60px;
972
1010
  height: 60px;
1011
+ */
1012
+ width: 40px;
1013
+ height: 40px;
973
1014
  border-radius: 10px;
974
1015
  }
975
1016
  body.dark .line .btn {
@@ -1468,8 +1509,16 @@ body.dark .btn2 {
1468
1509
  body.dark .btn2:hover {
1469
1510
  background: rgba(255,255,255,0.06);
1470
1511
  }
1512
+ /*
1513
+ body.dark .browser-options {
1514
+ background: rgba(255,255,255,0.05);
1515
+ }
1516
+ */
1471
1517
  .browser-options {
1472
1518
  padding: 10px;
1519
+ /*
1520
+ background: rgba(0,0,0,0.05);
1521
+ */
1473
1522
  }
1474
1523
  .btn2 {
1475
1524
  background: none;
@@ -1530,7 +1579,7 @@ body.dark .header-label {
1530
1579
  font-weight: bold;
1531
1580
  text-transform: uppercase;
1532
1581
  top: 0;
1533
- padding: 10px;
1582
+ padding: 25px 15px 15px;
1534
1583
  /*
1535
1584
  border-top: 2px solid rgba(0,0,0,0.04);
1536
1585
  */
@@ -1542,7 +1591,11 @@ nav.error-message {
1542
1591
  color: rgba(0,0,0,0.7);
1543
1592
  font-weight: bold;
1544
1593
  }
1545
- .not-running-apps {
1594
+ .not-running-apps, .running-apps {
1595
+ background: rgba(0,0,100,0.04);
1596
+ }
1597
+ body.dark .not-running-apps, body.dark .running-apps {
1598
+ background: rgba(255,255,255,0.03);
1546
1599
  }
1547
1600
  .running-apps .line img {
1548
1601
  border: 4px solid #8fd400;
Binary file
Binary file
Binary file
@@ -123,9 +123,16 @@ body.dark .env-item label {
123
123
  font-weight: bold;
124
124
  font-size: 18px;
125
125
  }
126
+ .env-item.highlighted {
127
+ border: 5px solid red;
128
+ }
126
129
  .env-item {
130
+ /*
127
131
  padding-top: 10px;
128
132
  padding-bottom: 30px;
133
+ */
134
+ padding: 10px;
135
+ margin-bottom: 20px;
129
136
  }
130
137
  body.dark .comment {
131
138
  border-left: 2px solid white;
@@ -178,8 +185,6 @@ body {
178
185
  }
179
186
  h1 {
180
187
  font-size: 50px;
181
- font-family: georgia;
182
- font-style: italic;
183
188
  padding-bottom: 20px;
184
189
  }
185
190
  footer {
@@ -208,6 +213,12 @@ footer .btn.go-home {
208
213
  #editor {
209
214
  height: auto;
210
215
  }
216
+ .env-title {
217
+ font-weight: bold;
218
+ }
219
+ .env-description {
220
+ margin-bottom: 10px;
221
+ }
211
222
  </style>
212
223
  <script>
213
224
  document.addEventListener("DOMContentLoaded", async () => {
@@ -294,7 +305,7 @@ document.addEventListener("DOMContentLoaded", async () => {
294
305
  </h1>
295
306
  </header>
296
307
  <% } %>
297
- <div id='editor' class='<%=init ? "hidden" : ''%>'>
308
+ <div id='editor' class='<%=init && !requires_instantiation ? "hidden" : ''%>'>
298
309
  <!--
299
310
  <h1>Configure</h1>
300
311
  -->
@@ -302,10 +313,23 @@ document.addEventListener("DOMContentLoaded", async () => {
302
313
  <% if (item.type === "comment") { %>
303
314
  <div class='comment'><%=item.val.replaceAll(/^[ #]+/g, "")%></div>
304
315
  <% } else { %>
305
- <div class='env-item'>
306
- <label for="<%=item.key%>"><%=item.key%></label>
307
- <input id="<%=item.key%>" type="text" value="<%=item.val%>">
308
- </div>
316
+ <% if(pre_items[item.key]) { %>
317
+ <div class='env-item highlighted'>
318
+ <label for="<%=item.key%>"><%=item.key%></label>
319
+ <% if (pre_items[item.key].title) { %>
320
+ <div class='env-title'><%=pre_items[item.key].title%></div>
321
+ <% } %>
322
+ <% if (pre_items[item.key].description) { %>
323
+ <div class='env-description'><%=pre_items[item.key].description%></div>
324
+ <% } %>
325
+ <input id="<%=item.key%>" type="text" value="<%=item.val%>">
326
+ </div>
327
+ <% } else { %>
328
+ <div class='env-item'>
329
+ <label for="<%=item.key%>"><%=item.key%></label>
330
+ <input id="<%=item.key%>" type="text" value="<%=item.val%>">
331
+ </div>
332
+ <% } %>
309
333
  <% } %>
310
334
  <% }) %>
311
335
  </div>
@@ -495,6 +495,12 @@ document.addEventListener("DOMContentLoaded", async () => {
495
495
  }
496
496
  })
497
497
  }
498
+ <% if (locals.prev) { %>
499
+ n.Noty({
500
+ text: '[Notice] finished',
501
+ type: 'success'
502
+ })
503
+ <% } %>
498
504
  /*
499
505
  n.Noty({
500
506
  text: '[Notice] finished',
@@ -740,6 +746,9 @@ const reloadMemory = async () => {
740
746
  <header class='navheader'>
741
747
  <% if (!install_required) { %>
742
748
  <div class='runner'>
749
+ <% if (locals.prev) { %>
750
+ <a class='btn' href="<%=prev%>"><i class="fa-solid fa-arrow-left"></i> Back</a>
751
+ <% } %>
743
752
  <div class='btn run <%= mod && runnable ? "" : "hidden" %>'>
744
753
  <span class='play'><i class="fa-solid fa-play"></i> Start</span>
745
754
  <span class='starting hidden'><i class="fa-solid fa-circle-notch fa-spin"></i> Starting...</span>
@@ -70,10 +70,12 @@ header .runner {
70
70
  padding-top: 5px;
71
71
  }
72
72
  .browser-options-row {
73
+ /*
73
74
  border-top: 1px solid rgba(0,0,0,0.1);
74
75
  border-bottom: 1px solid rgba(0,0,0,0.1);
76
+ */
75
77
  display: flex;
76
- padding: 20px 0;
78
+ padding: 10px;
77
79
  align-items: flex-start;
78
80
  }
79
81
  .browser-options-row h3 {
@@ -117,10 +119,12 @@ body.dark .btn {
117
119
  body.dark .badge {
118
120
  background: rgba(255,255,255,0.1);
119
121
  }
122
+ /*
120
123
  body.dark .browser-options-row {
121
124
  border-top: 1px solid rgba(255,255,255,0.05);
122
125
  border-bottom: 1px solid rgba(255,255,255,0.05);
123
126
  }
127
+ */
124
128
  @media only screen and (max-width: 480px) {
125
129
  .btn2 {
126
130
  padding: 5px;
@@ -288,6 +292,17 @@ body.dark .browser-options-row {
288
292
  </div>
289
293
  </div>
290
294
  <% } %>
295
+ <!--
296
+ <div class='type-tabs'>
297
+ <% if (mode === "task") { %>
298
+ <a class='type-tab' href="/"><img src='/pinokio-<%=theme=='dark' ? 'white' : 'black'%>.png'> Apps</a>
299
+ <a class='type-tab selected' href="/?mode=task"> <img src='/<%=theme=='dark' ? 'term-dark.png' : 'term-white.png'%>'> Tasks</a>
300
+ <% } else { %>
301
+ <a class='type-tab selected' href="/"><img src='/pinokio-<%=theme=='dark' ? 'white' : 'black'%>.png'> Apps</a>
302
+ <a class='type-tab' href="/?mode=task"> <img src='/<%=theme=='dark' ? 'term-dark.png' : 'term-white.png'%>'> Tasks</a>
303
+ <% } %>
304
+ </div>
305
+ -->
291
306
  <% if (running.length > 0) { %>
292
307
  <div class='running-apps'>
293
308
  <div class='header-label'>Running</div>
@@ -297,9 +312,16 @@ body.dark .browser-options-row {
297
312
  <% if (item.icon) { %>
298
313
  <img src="<%=item.icon%>">
299
314
  <% } else { %>
315
+ <% if (theme === 'dark') { %>
316
+ <img src="/pinokio-white.png">
317
+ <% } else { %>
318
+ <img src="/pinokio-black.png">
319
+ <% } %>
320
+ <!--
300
321
  <div class='avatar'>
301
322
  <i class="fa-regular fa-circle-dot"></i>
302
323
  </div>
324
+ -->
303
325
  <% } %>
304
326
  <div class='col'>
305
327
  <div class='uri'><i class="fa-regular fa-folder"></i><%=item.url%></div>
@@ -351,9 +373,16 @@ body.dark .browser-options-row {
351
373
  <% if (item.icon) { %>
352
374
  <img src="<%=item.icon%>">
353
375
  <% } else { %>
376
+ <!--
354
377
  <div class='avatar'>
355
378
  <i class="fa-regular fa-circle-dot"></i>
356
379
  </div>
380
+ -->
381
+ <% if (theme === 'dark') { %>
382
+ <img src="/pinokio-white.png">
383
+ <% } else { %>
384
+ <img src="/pinokio-black.png">
385
+ <% } %>
357
386
  <% } %>
358
387
  <div class='col'>
359
388
  <div class='uri'><i class="fa-regular fa-folder"></i><%=item.url%></div>
@@ -55,6 +55,9 @@ h1 {
55
55
  margin: 10px 0;
56
56
 
57
57
  }
58
+ .item .title {
59
+ font-weight: bold;
60
+ }
58
61
  .item .btn {
59
62
  width: 50px;
60
63
  text-align: center;
@@ -78,6 +81,22 @@ footer a.btn {
78
81
  .e {
79
82
  padding: 5px 0;
80
83
  }
84
+ .env {
85
+ padding: 10px;
86
+ border-left: 2px solid black;
87
+ margin-top: 10px;
88
+ }
89
+ .env label {
90
+ font-weight: bold;
91
+ font-size: 12px;
92
+ display: block;
93
+ margin-bottom: 5px;
94
+ }
95
+ .env input[type=text] {
96
+ padding: 5px;
97
+ box-sizing: border-box;
98
+ width: 100%;
99
+ }
81
100
  </style>
82
101
  </head>
83
102
  <body class='columns <%=theme%>'>
@@ -91,14 +110,29 @@ footer a.btn {
91
110
  </div>
92
111
  <div class='items'>
93
112
  <% items.forEach((item) => { %>
94
- <div class='item'>
95
- <img src="<%=item.icon%>">
113
+ <% if (item.href) { %>
114
+ <div class='item'>
115
+ <% if (item.icon) { %>
116
+ <img src="<%=item.icon%>">
117
+ <% } %>
118
+ <div class='col'>
119
+ <div class='title'><%=item.title%></div>
120
+ <div class='description'><%=item.description%></div>
121
+ </div>
122
+ <a target="_blank" features="browser" href='<%=item.href%>' class='btn'>Get</a>
123
+ </div>
124
+ <% } else if (item.env) { %>
125
+ <!--
96
126
  <div class='col'>
97
127
  <div class='title'><%=item.title%></div>
98
128
  <div class='description'><%=item.description%></div>
129
+ <div class='env'>
130
+ <label><%=item.env%></label>
131
+ <input type='text' value="<%=env[item.env] ? env[item.env] : ''%>" />
132
+ </div>
99
133
  </div>
100
- <a target="_blank" features="browser" href='<%=item.href%>' class='btn'>Get</a>
101
- </div>
134
+ -->
135
+ <% } %>
102
136
  <% }) %>
103
137
  </div>
104
138
  <footer>
@@ -143,8 +143,6 @@ body.dark .browser-options-row {
143
143
  margin-top: 10px;
144
144
  }
145
145
  .header-label {
146
- font-family: Georgia;
147
- font-style: italic;
148
146
  font-size: 50px;
149
147
  letter-spacing: -1px;
150
148
  padding: 50px;
@@ -255,7 +253,15 @@ body.dark .browser-options-row {
255
253
  <% apps.forEach((item) => { %>
256
254
  <a class='line align-top' href="<%=item.link%>">
257
255
  <h3>
258
- <img class='icon' src="<%=item.icon%>">
256
+ <% if (item.icon) { %>
257
+ <img class='icon' src="<%=item.icon%>">
258
+ <% } else { %>
259
+ <% if (theme === 'dark') { %>
260
+ <img class='icon' src="/pinokio-white.png">
261
+ <% } else { %>
262
+ <img class='icon' src="/pinokio-black.png">
263
+ <% } %>
264
+ <% } %>
259
265
  <div class='col'>
260
266
  <div class='title'><%=item.name%></div>
261
267
  <div class='description'><%=item.description%></div>
@@ -0,0 +1,275 @@
1
+ <html class='columns'>
2
+ <head>
3
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
4
+ <script src="/hotkeys.min.js"></script>
5
+ <script src="/ace/ace.js"></script>
6
+ <script src="/noty.js"></script>
7
+ <script src="/notyq.js"></script>
8
+ <script src="/xterm.js"></script>
9
+ <script src="/xterm-addon-fit.js"></script>
10
+ <script src="/xterm-addon-web-links.js"></script>
11
+ <script src="/xterm-theme.js"></script>
12
+ <script src="/xterm-addon-search.js"></script>
13
+ <script src="/xterm-addon-search-bar.js"></script>
14
+ <script src="/sweetalert2.js"></script>
15
+ <script src="/Socket.js"></script>
16
+ <script src="/common.js"></script>
17
+ <script src="/he.js"></script>
18
+ <script src="/opener.js"></script>
19
+ <script src="/nav.js"></script>
20
+ <script src="/autoexpand.js"></script>
21
+ <script src="/modalinput.js"></script>
22
+ <script src="/simplemodal.js"></script>
23
+ <script src="/waitmodal.js"></script>
24
+ <script src="/notifyinput.js"></script>
25
+ <script src="/report.js"></script>
26
+ <link href="/xterm.min.css" rel="stylesheet" />
27
+ <link href="/css/fontawesome.min.css" rel="stylesheet">
28
+ <link href="/css/solid.min.css" rel="stylesheet">
29
+ <link href="/css/regular.min.css" rel="stylesheet">
30
+ <link href="/css/brands.min.css" rel="stylesheet">
31
+ <link href="/style.css" rel="stylesheet"/>
32
+ <link href="/noty.css" rel="stylesheet"/>
33
+ <% if (agent === "electron") { %>
34
+ <link href="/electron.css" rel="stylesheet"/>
35
+ <% } %>
36
+ <style>
37
+ body.frozen {
38
+ display: flex;
39
+ flex-direction: column;
40
+ height: 100%;
41
+ }
42
+ #table > table {
43
+ border-left: 2px solid black;
44
+ padding-left: 5px;
45
+ margin: 10px 0;
46
+ }
47
+ .highlight {
48
+ background: yellow;
49
+ width: 100px;
50
+ }
51
+ th {
52
+ background: rgba(0,0,0,0.1);
53
+ padding: 10px;
54
+ font-size: 12px;
55
+ }
56
+ td {
57
+ font-size: 12px;
58
+ padding: 10px;
59
+ }
60
+ td.val {
61
+ background: rgba(0,0,0,0.06);
62
+ }
63
+ td.key {
64
+ background: rgba(0,0,0,0.1);
65
+ }
66
+ .button {
67
+ cursor: pointer;
68
+ background: rgba(0,0,0,0.8);
69
+ color: white;
70
+ padding: 5px 10px;
71
+ border-radius: 4px;
72
+ }
73
+ .button:hover {
74
+
75
+ }
76
+ main {
77
+ width: 100%;
78
+ box-sizing: border-box;
79
+ max-width: 600px;
80
+ padding: 20px;
81
+ margin: 0 auto;
82
+ }
83
+
84
+ header .btn {
85
+ font-family: Sans-serif;
86
+ display: block;
87
+ margin-left: 10px;
88
+ font-style: normal;
89
+ font-size: 12px;
90
+ font-weight: normal;
91
+ padding: 5px 10px;
92
+ }
93
+ .disabled {
94
+ opacity: 0.7;
95
+ }
96
+ body.dark .env-item input[type=text] {
97
+ background: white;
98
+ }
99
+ .env-item input[type=text] {
100
+ width: 100%;
101
+ padding: 10px;
102
+ box-sizing: border-box;
103
+ border: none;
104
+ background: rgba(0,0,100, 0.1);
105
+ }
106
+ body.dark .env-item label {
107
+ color: cornflowerblue;
108
+ }
109
+ .env-item label {
110
+ color: royalblue;
111
+ display: block;
112
+ margin-bottom: 5px;
113
+ font-weight: bold;
114
+ font-size: 18px;
115
+ }
116
+ .env-item.highlighted {
117
+ border: 5px solid red;
118
+ }
119
+ .env-item {
120
+ /*
121
+ padding-top: 10px;
122
+ padding-bottom: 30px;
123
+ */
124
+ padding: 10px;
125
+ margin-bottom: 20px;
126
+ }
127
+ body.dark .comment {
128
+ border-left: 2px solid white;
129
+ }
130
+ .comment {
131
+ opacity: 0.8;
132
+ border-left: 2px solid black;
133
+ padding-left: 10px;
134
+ }
135
+ #save {
136
+ background: royalblue;
137
+ width: 100%;
138
+ box-sizing: border-box;
139
+ text-align: center;
140
+ }
141
+ a#customize {
142
+ text-decoration: underline;
143
+ cursor: pointer;
144
+ }
145
+ .e {
146
+ padding: 10px 0;
147
+ }
148
+ #editor {
149
+ padding: 20px 0;
150
+ }
151
+ .center {
152
+ display: flex;
153
+ align-items: center;
154
+ justify-content: center;
155
+ }
156
+ body {
157
+ display: block;
158
+ }
159
+ .card {
160
+ display: flex;
161
+ padding: 10px 0;
162
+ box-sizing: border-box;
163
+ }
164
+ .card img {
165
+ width: 100px;
166
+ border-radius: 10px;
167
+ }
168
+ .card .description {
169
+ opacity: 0.8;
170
+ }
171
+ .card .title {
172
+ font-weight: bold;
173
+ font-size: 30px;
174
+ letter-spacing: -1px;
175
+ }
176
+ .card .col {
177
+ padding-left: 10px;
178
+ }
179
+ h1 {
180
+ text-align: center;
181
+ font-size: 50px;
182
+ padding-bottom: 20px;
183
+ }
184
+ footer {
185
+ background: none;
186
+ padding: 0;
187
+ text-align: right;
188
+ display: flex;
189
+ margin: 10px 0 20px 0;
190
+ }
191
+ footer .btn {
192
+ margin-left: 10px;
193
+ display: inline-block;
194
+ -webkit-appearance: button;
195
+ -moz-appearance: button;
196
+ appearance: button;
197
+
198
+ }
199
+ footer .btn.go-home {
200
+ margin-left: 0px;
201
+ }
202
+ .btn.home-button {
203
+ background: none !important;
204
+ margin: 0 !important;
205
+ font-size: 16px !important;
206
+ }
207
+ #editor {
208
+ height: auto;
209
+ }
210
+ .env-title {
211
+ font-weight: bold;
212
+ }
213
+ .env-description {
214
+ margin-bottom: 10px;
215
+ }
216
+ .subtitle {
217
+ text-align: center;
218
+ }
219
+ </style>
220
+ <script>
221
+ document.addEventListener("DOMContentLoaded", async () => {
222
+ const n = new N()
223
+ document.querySelector("#save").addEventListener("click", async (e) => {
224
+ // save
225
+ const vals = {}
226
+ const els = document.querySelectorAll(".env-item")
227
+ for(let el of els) {
228
+ let input = el.querySelector("input[type=text]")
229
+ vals[input.id] = input.value
230
+ }
231
+ console.log("vals", vals)
232
+ let res = await fetch("/env", {
233
+ method: "POST",
234
+ headers: {
235
+ "Content-Type": "application/json"
236
+ },
237
+ body: JSON.stringify({
238
+ filepath: "<%=filepath%>",
239
+ vals
240
+ })
241
+ }).then((res) => {
242
+ return res.json()
243
+ })
244
+ console.log("res" ,res)
245
+ location.href = location.href
246
+ })
247
+ })
248
+ </script>
249
+ </head>
250
+ <body class='<%=theme%> center'>
251
+ <main>
252
+ <div>
253
+ <h1><%=filename%></h1>
254
+ <div class='subtitle'>Please enter the required values to continue.</div>
255
+ </div>
256
+ <div id='editor'>
257
+ <% items.forEach((item) => { %>
258
+ <div class='env-item'>
259
+ <label for="<%=item.env%>"><%=item.env%></label>
260
+ <% if (item.title) { %>
261
+ <div class='env-title'><%=item.title%></div>
262
+ <% } %>
263
+ <% if (item.description) { %>
264
+ <div class='env-description'><%=item.description%></div>
265
+ <% } %>
266
+ <input id="<%=item.env%>" type="text" value="<%=item.val%>">
267
+ </div>
268
+ <% }) %>
269
+ <div id='save' class='btn'>
270
+ <span class='save'><i class="fa-solid fa-check"></i> Done</span>
271
+ </div>
272
+ </div>
273
+ </main>
274
+ </body>
275
+ </html>
@@ -66,10 +66,8 @@
66
66
  padding: 20px 0;
67
67
  }
68
68
  .titleview h1 {
69
- font-style: italic;
70
69
  word-break: break-word;
71
70
  font-size: 50px;
72
- font-family: Georgia;
73
71
  letter-spacing: -1px;
74
72
  }
75
73
  .item > .d {
@@ -206,8 +206,6 @@ body.dark .cloudflare-running {
206
206
  }
207
207
  h1 {
208
208
  font-size: 50px;
209
- font-family: georgia;
210
- font-style: italic;
211
209
  padding-bottom: 10px;
212
210
  }
213
211