pinokiod 3.9.0 → 3.9.3
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/:w +1247 -0
- package/kernel/api/filepicker/index.js +59 -0
- package/kernel/api/fs/index.js +6 -4
- package/kernel/api/index.js +123 -37
- package/kernel/api/input/index.js +2 -0
- package/kernel/api/web/index.js +6 -0
- package/kernel/bin/caddy.js +127 -0
- package/kernel/bin/cloudflared.js +1 -0
- package/kernel/bin/conda.js +10 -2
- package/kernel/bin/cuda.js +0 -16
- package/kernel/bin/ffmpeg.js +4 -6
- package/kernel/bin/git.js +55 -29
- package/kernel/bin/gxx.js +8 -6
- package/kernel/bin/huggingface.js +4 -5
- package/kernel/bin/index.js +347 -88
- package/kernel/bin/node.js +13 -6
- package/kernel/bin/py.js +1 -1
- package/kernel/bin/setup.js +146 -0
- package/kernel/bin/uv.js +4 -5
- package/kernel/bin/zip.js +7 -8
- package/kernel/connect/index.js +25 -0
- package/kernel/connect/providers/github/README.md +11 -0
- package/kernel/connect/providers/x/README.md +96 -0
- package/kernel/connect/providers/x/index.js +152 -0
- package/kernel/environment.js +50 -1
- package/kernel/index.js +152 -32
- package/kernel/info.js +4 -2
- package/kernel/kv.js +38 -0
- package/kernel/loader.js +13 -3
- package/kernel/peer.js +161 -0
- package/kernel/procs.js +116 -0
- package/kernel/prototype.js +62 -0
- package/kernel/router/common.js +42 -0
- package/kernel/router/connector.js +81 -0
- package/kernel/router/index.js +235 -0
- package/kernel/router/localhost_home_router.js +84 -0
- package/kernel/router/localhost_port_router.js +15 -0
- package/kernel/router/localhost_variable_router.js +37 -0
- package/kernel/router/peer_home_router.js +15 -0
- package/kernel/router/peer_peer_router.js +26 -0
- package/kernel/router/peer_port_router.js +45 -0
- package/kernel/router/peer_variable_router.js +46 -0
- package/kernel/router/processor.js +31 -0
- package/kernel/shell.js +141 -60
- package/kernel/shells.js +32 -17
- package/kernel/store.js +58 -0
- package/kernel/sysinfo.js +0 -1
- package/kernel/util.js +143 -36
- package/package.json +4 -1
- package/pipe/index.js +0 -2
- package/script/index.js +12 -0
- package/server/index.js +1473 -553
- package/server/public/Socket.js +5 -1
- package/server/public/SourceCodePro-Regular.ttf +0 -0
- package/server/public/SpaceMono-Bold.ttf +0 -0
- package/server/public/SpaceMono-BoldItalic.ttf +0 -0
- package/server/public/SpaceMono-Italic.ttf +0 -0
- package/server/public/SpaceMono-Regular.ttf +0 -0
- package/server/public/commander.js +40 -0
- package/server/public/common.js +60 -0
- package/server/public/dropzone-min.js +2 -0
- package/server/public/dropzone.css +1 -0
- package/server/public/filepond-plugin-file-validate-type.min.js +9 -0
- package/server/public/filepond-plugin-image-crop.min.js +9 -0
- package/server/public/filepond-plugin-image-edit.min.css +8 -0
- package/server/public/filepond-plugin-image-edit.min.js +9 -0
- package/server/public/filepond-plugin-image-exif-orientation.min.js +9 -0
- package/server/public/filepond-plugin-image-preview.min.css +8 -0
- package/server/public/filepond-plugin-image-preview.min.js +9 -0
- package/server/public/filepond-plugin-image-resize.min.js +9 -0
- package/server/public/filepond-plugin-image-transform.min.js +9 -0
- package/server/public/filepond.min.css +8 -0
- package/server/public/filepond.min.js +9 -0
- package/server/public/fscreator.js +174 -0
- package/server/public/fseditor.js +212 -0
- package/server/public/github.png +0 -0
- package/server/public/highlight-js.js +81 -0
- package/server/public/highlight.css +9 -0
- package/server/public/highlight.js +1244 -0
- package/server/public/install.js +17 -20
- package/server/public/modalinput.js +105 -9
- package/server/public/opener.js +3 -1
- package/server/public/pinokio-black.png +0 -0
- package/server/public/pinokio-black2.png +0 -0
- package/server/public/redoc.standalone.js +1832 -0
- package/server/public/style.css +215 -17
- package/server/public/swagger-ui-bundle.js +2 -0
- package/server/public/swagger-ui.css +3 -0
- package/server/public/x.js +63 -0
- package/server/socket.js +136 -39
- package/server/views/404.ejs +0 -1
- package/server/views/app.ejs +368 -98
- package/server/views/bootstrap.ejs +22 -19
- package/server/views/connect/x.ejs +324 -0
- package/server/views/connect.ejs +197 -0
- package/server/views/download.ejs +7 -1
- package/server/views/editor.ejs +68 -9
- package/server/views/explore.ejs +13 -10
- package/server/views/file_explorer.ejs +10 -37
- package/server/views/github.ejs +218 -0
- package/server/views/help.ejs +4 -3
- package/server/views/index.ejs +275 -121
- package/server/views/install.ejs +56 -29
- package/server/views/keys.ejs +276 -0
- package/server/views/network.ejs +889 -0
- package/server/views/partials/dynamic.ejs +9 -0
- package/server/views/partials/menu.ejs +7 -1
- package/server/views/prototype/index.ejs +311 -0
- package/server/views/prototype/show.ejs +383 -0
- package/server/views/redoc.ejs +18 -0
- package/server/views/required_env_editor.ejs +11 -2
- package/server/views/settings.ejs +38 -10
- package/server/views/setup.ejs +254 -0
- package/server/views/setup_home.ejs +192 -0
- package/server/views/shell.ejs +781 -0
- package/server/views/swaggerui.ejs +19 -0
- package/server/views/terminal.ejs +174 -42
- package/LICENSE +0 -7
- package/server/views/proxy.ejs +0 -405
package/server/views/index.ejs
CHANGED
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
<link href="/css/brands.min.css" rel="stylesheet">
|
|
11
11
|
<link href="/markdown.css" rel="stylesheet"/>
|
|
12
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" />
|
|
13
16
|
<link href="/style.css" rel="stylesheet"/>
|
|
14
17
|
<% if (agent === "electron") { %>
|
|
15
18
|
<link href="/electron.css" rel="stylesheet"/>
|
|
@@ -125,6 +128,55 @@ body.dark .browser-options-row {
|
|
|
125
128
|
border-bottom: 1px solid rgba(255,255,255,0.05);
|
|
126
129
|
}
|
|
127
130
|
*/
|
|
131
|
+
.context-menu-wrapper {
|
|
132
|
+
padding: 2px 0;
|
|
133
|
+
background: rgba(0,0,0,0.9);
|
|
134
|
+
}
|
|
135
|
+
.context-menu {
|
|
136
|
+
/*
|
|
137
|
+
max-height: 10000px;
|
|
138
|
+
overflow: hidden;
|
|
139
|
+
transition: max-height 1s ease-in-out;
|
|
140
|
+
*/
|
|
141
|
+
display: flex;
|
|
142
|
+
}
|
|
143
|
+
.context-menu .btn:hover {
|
|
144
|
+
color: cornflowerblue !important;
|
|
145
|
+
}
|
|
146
|
+
.context-menu .btn {
|
|
147
|
+
background: none !important;
|
|
148
|
+
border: none !important;
|
|
149
|
+
display: block;
|
|
150
|
+
width: 80px;
|
|
151
|
+
padding: 6px 10px !important;
|
|
152
|
+
text-align: left;
|
|
153
|
+
}
|
|
154
|
+
.context-menu.collapsed {
|
|
155
|
+
/*
|
|
156
|
+
max-height: 0;
|
|
157
|
+
*/
|
|
158
|
+
display: none;
|
|
159
|
+
}
|
|
160
|
+
body.dark .open-menu {
|
|
161
|
+
background: black !important;
|
|
162
|
+
color: white !important;
|
|
163
|
+
}
|
|
164
|
+
.open-menu {
|
|
165
|
+
width: 80px;
|
|
166
|
+
border-radius: 0 !important;
|
|
167
|
+
background: white !important;
|
|
168
|
+
color: black !important;
|
|
169
|
+
border: 1px solid rgba(0, 0, 0, 0.3);
|
|
170
|
+
}
|
|
171
|
+
.open-menu.selected {
|
|
172
|
+
border: none !important;
|
|
173
|
+
/*
|
|
174
|
+
background: none !important;
|
|
175
|
+
*/
|
|
176
|
+
}
|
|
177
|
+
.open-menu.selected span {
|
|
178
|
+
display: none;
|
|
179
|
+
}
|
|
128
180
|
@media only screen and (max-width: 480px) {
|
|
129
181
|
.btn2 {
|
|
130
182
|
padding: 5px;
|
|
@@ -152,6 +204,16 @@ body.dark .browser-options-row {
|
|
|
152
204
|
<script src="/nav.js"></script>
|
|
153
205
|
<script src="/fuse.js"></script>
|
|
154
206
|
<script src="/report.js"></script>
|
|
207
|
+
<script src="/filepond-plugin-file-validate-type.min.js"></script>
|
|
208
|
+
<script src="/filepond-plugin-image-exif-orientation.min.js"></script>
|
|
209
|
+
<script src="/filepond-plugin-image-preview.min.js"></script>
|
|
210
|
+
<script src="/filepond-plugin-image-edit.min.js"></script>
|
|
211
|
+
<script src="/filepond-plugin-image-crop.min.js"></script>
|
|
212
|
+
<script src="/filepond-plugin-image-resize.min.js"></script>
|
|
213
|
+
<script src="/filepond-plugin-image-transform.min.js"></script>
|
|
214
|
+
<script src="/filepond.min.js"></script>
|
|
215
|
+
<script src="/fscreator.js"></script>
|
|
216
|
+
<script src="/fseditor.js"></script>
|
|
155
217
|
</head>
|
|
156
218
|
<body class='<%=theme%>'>
|
|
157
219
|
<% if (error) { %>
|
|
@@ -168,8 +230,18 @@ body.dark .browser-options-row {
|
|
|
168
230
|
<h1>
|
|
169
231
|
<% if (ishome) { %>
|
|
170
232
|
<a class='home' href="/"><i class="fa-solid fa-house"></i></a>
|
|
171
|
-
<button class='btn2' id='back'><i class="fa-solid fa-chevron-left"></i></button>
|
|
172
|
-
<button class='btn2' id='forward'><i class="fa-solid fa-chevron-right"></i></button>
|
|
233
|
+
<button class='btn2' id='back'><div><i class="fa-solid fa-chevron-left"></i></div><div>Prev</div></button>
|
|
234
|
+
<button class='btn2' id='forward'><div><i class="fa-solid fa-chevron-right"></i></div><div>Next</div></button>
|
|
235
|
+
<a class='btn2 create-new' id='create-new-folder'><div><i class='fa-solid fa-plus'></i></div><div>New</div></a>
|
|
236
|
+
<!--
|
|
237
|
+
<a href="/new" class='btn2'><div><i class='fa-solid fa-folder-plus'></i></div><div>Create</div></a>
|
|
238
|
+
-->
|
|
239
|
+
<a class='btn2' id='explore' href="/?mode=explore"><div><i class="fa-solid fa-globe"></i></div><div>Discover</div></a>
|
|
240
|
+
<a href="/network" class='btn2'><div><i class="fa-solid fa-wifi"></i></div><div>Network</div></a>
|
|
241
|
+
<a href="/connect" class='btn2'><div><i class="fa-solid fa-circle-user"></i></div><div>Connect</div></a>
|
|
242
|
+
<!--
|
|
243
|
+
<button id='newfolder' class='btn2'><div><i class="fa-solid fa-folder-plus"></i></div><div>New Folder</div></button>
|
|
244
|
+
-->
|
|
173
245
|
<% } %>
|
|
174
246
|
<% paths.forEach((path) => { %>
|
|
175
247
|
<% if (path.action) { %>
|
|
@@ -186,14 +258,18 @@ body.dark .browser-options-row {
|
|
|
186
258
|
</form>
|
|
187
259
|
<% if (ishome) { %>
|
|
188
260
|
<div class='nav-btns'>
|
|
189
|
-
<a class='btn2' id='explore' href="/?mode=explore"><div><i class="fa-solid fa-globe"></i></div><div>Discover</div></a>
|
|
190
261
|
<a class='btn2' href="<%=portal%>" target="_blank"><div><i class="fa-solid fa-question"></i></div><div>Help</div></a>
|
|
191
262
|
<% if (agent === "electron") { %>
|
|
192
263
|
<a class='btn2' data-filepath="<%=filepath%>"><div><i class="fa-regular fa-folder-open"></i></div><div>Files</div></a>
|
|
193
264
|
<% } %>
|
|
194
|
-
<button class='btn2' id='genlog'><div><i class="fa-solid fa-laptop-code"></i></div><div>
|
|
265
|
+
<button class='btn2' id='genlog'><div><i class="fa-solid fa-laptop-code"></i></div><div>Logs</div></button>
|
|
195
266
|
<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>
|
|
196
267
|
<a class='btn2' href="/?mode=settings"><div><i class="fa-solid fa-gear"></i></div><div>Settings</div></a>
|
|
268
|
+
<% if (agent === "electron") { %>
|
|
269
|
+
<a href="/" target="_blank" class='btn2' features="browser"><div><i class="fa-solid fa-square-up-right"></i></div><div>Open</div></a>
|
|
270
|
+
<% } else { %>
|
|
271
|
+
<a href="/" target="_blank" class='btn2'><div><i class="fa-solid fa-square-up-right"></i></div><div>Open</div></a>
|
|
272
|
+
<% } %>
|
|
197
273
|
<button id='new-window' title='open a new window' class='btn2'><div><i class="fa-solid fa-plus"></i></div><div>Window</div></button>
|
|
198
274
|
</div>
|
|
199
275
|
<% } %>
|
|
@@ -203,7 +279,7 @@ body.dark .browser-options-row {
|
|
|
203
279
|
<button class='btn' id='open-fs' data-filepath="<%=filepath%>"><i class="fa-solid fa-eye"></i> View Folder</button>
|
|
204
280
|
</div>
|
|
205
281
|
<% } %>
|
|
206
|
-
<% if (display.includes("dependencies")) { %>
|
|
282
|
+
<% if (display.includes("dependencies") && config) { %>
|
|
207
283
|
<div class='dependencies'>
|
|
208
284
|
<h2>Prerequisites</h2>
|
|
209
285
|
<div class='item'>Download and install the following dependencies first</div>
|
|
@@ -225,6 +301,7 @@ body.dark .browser-options-row {
|
|
|
225
301
|
<% if (ishome) { %>
|
|
226
302
|
<% if (running.length === 0 && notRunning.length === 0) { %>
|
|
227
303
|
<% } else { %>
|
|
304
|
+
<% if (false) { %>
|
|
228
305
|
<div class='browser-options'>
|
|
229
306
|
<% if (agent === "electron") { %>
|
|
230
307
|
<div class='browser-options-row'>
|
|
@@ -240,38 +317,12 @@ body.dark .browser-options-row {
|
|
|
240
317
|
</div>
|
|
241
318
|
<% } %>
|
|
242
319
|
<div class='browser-options-row'>
|
|
243
|
-
<a href="/
|
|
320
|
+
<a href="/network" class='btn'><div><i class="fa-solid fa-gauge"></i> Configure</div></a>
|
|
244
321
|
<div class='flexible'>
|
|
245
322
|
<h3><i class="fa-solid fa-wifi"></i> Local Sharing</h3>
|
|
246
323
|
<div>Serve Pinokio, installed apps, and even external apps (example: Ollama) to any device on the same network.</div>
|
|
247
324
|
</div>
|
|
248
325
|
</div>
|
|
249
|
-
<!--
|
|
250
|
-
<div class='browser-options-row'>
|
|
251
|
-
<a href="/proxy" class='flexible'>
|
|
252
|
-
<h3><i class="fa-solid fa-wifi"></i> Local Share</h3>
|
|
253
|
-
<div>Access Pinokio, Ollama, and other 3rd party apps from any device on the same network. By default it's off.</div>
|
|
254
|
-
</a>
|
|
255
|
-
<% if (false) { %>
|
|
256
|
-
<% if (proxy) { %>
|
|
257
|
-
<a id='wifi-stop' data-proxy="<%=proxy.proxy%>" class='btn'><div><i class="fa-solid fa-stop"></i> Stop</div></a>
|
|
258
|
-
<div class='flexible'>
|
|
259
|
-
<h3><i class="fa-solid fa-wifi"></i> Local Share</h3>
|
|
260
|
-
<div>Access Pinokio from any device on the same network. By default it's off.</div>
|
|
261
|
-
<span class='badge'><i class="fa-solid fa-circle-notch fa-spin"></i> Running at <a href="<%=proxy.proxy%>" target="_blank" features="browser"><%=proxy.proxy%></a></span>
|
|
262
|
-
<a id='wifi-qr' class='badge'><i class="fa-solid fa-qrcode"></i> Scan QR Code</a>
|
|
263
|
-
</div>
|
|
264
|
-
<% } else { %>
|
|
265
|
-
<a id='wifi' class='btn'><div><i class="fa-solid fa-play"></i> Start</div></a>
|
|
266
|
-
<a id='wifi-starting' class='btn disabled hidden'><div><i class="fa-solid fa-circle-notch fa-spin"></i> Starting</div></a>
|
|
267
|
-
<div class='flexible'>
|
|
268
|
-
<h3><i class="fa-solid fa-wifi"></i> Local Share</h3>
|
|
269
|
-
<div>Access Pinokio from any device on the same network. By default it's off.</div>
|
|
270
|
-
</div>
|
|
271
|
-
<% } %>
|
|
272
|
-
<% } %>
|
|
273
|
-
</div>
|
|
274
|
-
-->
|
|
275
326
|
<div class='browser-options-row hidden'>
|
|
276
327
|
<% if (cloudflare_pub) { %>
|
|
277
328
|
<a id='cloudflare-stop' class='btn'><div><i class="fa-solid fa-stop"></i> Stop</div></a>
|
|
@@ -291,49 +342,48 @@ body.dark .browser-options-row {
|
|
|
291
342
|
<% } %>
|
|
292
343
|
</div>
|
|
293
344
|
</div>
|
|
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
345
|
<% } %>
|
|
304
|
-
|
|
305
|
-
-->
|
|
346
|
+
<% } %>
|
|
306
347
|
<% if (running.length > 0) { %>
|
|
307
348
|
<div class='running-apps'>
|
|
349
|
+
<!--
|
|
308
350
|
<div class='header-label'>Running</div>
|
|
351
|
+
-->
|
|
309
352
|
<% running.forEach((item) => { %>
|
|
310
|
-
<a href="<%=item.browser_url%>" data-description="<%=item.description%>" data-index="<%=item.index%>" data-name="<%=item.name%>" data-uri="<%=item.uri%>" class='line align-top'>
|
|
353
|
+
<a href="<%=item.browser_url%>" data-description="<%=item.description%>" data-index="<%=item.index%>" data-name="<%=item.name%>" data-title="<%=item.name%>" data-uri="<%=item.uri%>" data-icon="<%=item.icon%>" data-path="<%=item.path%>" data-iconpath="<%=item.iconpath ? item.iconpath : ''%>" class='line align-top'>
|
|
311
354
|
<h3>
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
<% if (theme === 'dark') { %>
|
|
316
|
-
<img src="/pinokio-white.png">
|
|
355
|
+
<div class='item-icon'>
|
|
356
|
+
<% if (item.icon) { %>
|
|
357
|
+
<img src="<%=item.icon%>">
|
|
317
358
|
<% } else { %>
|
|
318
|
-
|
|
359
|
+
<% if (theme === 'dark') { %>
|
|
360
|
+
<img src="/pinokio-white.png">
|
|
361
|
+
<% } else { %>
|
|
362
|
+
<img src="/pinokio-black.png">
|
|
363
|
+
<% } %>
|
|
319
364
|
<% } %>
|
|
320
|
-
|
|
321
|
-
<div class='avatar'>
|
|
322
|
-
<i class="fa-regular fa-circle-dot"></i>
|
|
323
|
-
</div>
|
|
324
|
-
-->
|
|
325
|
-
<% } %>
|
|
365
|
+
</div>
|
|
326
366
|
<div class='col'>
|
|
327
367
|
<div class='uri'><i class="fa-regular fa-folder"></i><%=item.url%></div>
|
|
328
368
|
<div class='title'><%=item.name%></div>
|
|
329
369
|
<div class='description'><%=item.description%></div>
|
|
330
|
-
<div>
|
|
331
|
-
<
|
|
332
|
-
<
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
<
|
|
336
|
-
|
|
370
|
+
<div class='menu-btns'>
|
|
371
|
+
<div>
|
|
372
|
+
<button class='btn open-menu'>
|
|
373
|
+
<i class="fa-solid fa-bars"></i><span> Menu</span>
|
|
374
|
+
</button>
|
|
375
|
+
<div class='context-menu collapsed'>
|
|
376
|
+
<div class='context-menu-wrapper'>
|
|
377
|
+
<button class='btn browse' data-src="<%=item.browser_url%>/browse">
|
|
378
|
+
<i class='fa-regular fa-folder-open'></i> View
|
|
379
|
+
</button>
|
|
380
|
+
<button class='btn copy-menu' data-src="<%=item.browser_url%>/browse">
|
|
381
|
+
<i class='fa-solid fa-copy'></i> Copy
|
|
382
|
+
</button>
|
|
383
|
+
</div>
|
|
384
|
+
</div>
|
|
385
|
+
</div>
|
|
386
|
+
<div class='flexible'></div>
|
|
337
387
|
<% if (item.running_scripts) { %>
|
|
338
388
|
<% item.running_scripts.forEach((s) => { %>
|
|
339
389
|
<button class='btn shutdown' data-src="<%=s.path%>">
|
|
@@ -353,12 +403,11 @@ body.dark .browser-options-row {
|
|
|
353
403
|
</div>
|
|
354
404
|
<% } %>
|
|
355
405
|
</div>
|
|
406
|
+
<!--
|
|
356
407
|
<div class='spinner'>
|
|
357
408
|
<i class="fa-solid fa-chevron-right"></i>
|
|
358
|
-
<!--
|
|
359
|
-
<i class="fa-solid fa-circle-notch fa-spin"></i>
|
|
360
|
-
-->
|
|
361
409
|
</div>
|
|
410
|
+
-->
|
|
362
411
|
</h3>
|
|
363
412
|
</a>
|
|
364
413
|
<% }) %>
|
|
@@ -366,34 +415,52 @@ body.dark .browser-options-row {
|
|
|
366
415
|
<% } %>
|
|
367
416
|
<% if (notRunning.length > 0) { %>
|
|
368
417
|
<div class='not-running-apps'>
|
|
418
|
+
<!--
|
|
369
419
|
<div class='header-label'>Not Running</div>
|
|
420
|
+
-->
|
|
370
421
|
<% notRunning.forEach((item) => { %>
|
|
371
|
-
<a href="<%=item.browser_url%>" data-description="<%=item.description%>" data-index="<%=item.index%>" data-name="<%=item.name%>" data-uri="<%=item.uri%>" class='line align-top'>
|
|
422
|
+
<a href="<%=item.browser_url%>" data-description="<%=item.description%>" data-index="<%=item.index%>" data-name="<%=item.name%>" data-title="<%=item.name%>" data-uri="<%=item.uri%>" data-icon="<%=item.icon%>" data-path="<%=item.path%>" data-iconpath="<%=item.iconpath ? item.iconpath : ''%>" class='line align-top'>
|
|
372
423
|
<h3>
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
<!--
|
|
377
|
-
<div class='avatar'>
|
|
378
|
-
<i class="fa-regular fa-circle-dot"></i>
|
|
379
|
-
</div>
|
|
380
|
-
-->
|
|
381
|
-
<% if (theme === 'dark') { %>
|
|
382
|
-
<img src="/pinokio-white.png">
|
|
424
|
+
<div class='item-icon'>
|
|
425
|
+
<% if (item.icon) { %>
|
|
426
|
+
<img src="<%=item.icon%>">
|
|
383
427
|
<% } else { %>
|
|
384
|
-
|
|
428
|
+
<% if (theme === 'dark') { %>
|
|
429
|
+
<img src="/pinokio-white.png">
|
|
430
|
+
<% } else { %>
|
|
431
|
+
<img src="/pinokio-black.png">
|
|
432
|
+
<% } %>
|
|
385
433
|
<% } %>
|
|
386
|
-
|
|
434
|
+
</div>
|
|
387
435
|
<div class='col'>
|
|
388
436
|
<div class='uri'><i class="fa-regular fa-folder"></i><%=item.url%></div>
|
|
389
437
|
<div class='title'><%=item.name%></div>
|
|
390
438
|
<div class='description'><%=item.description%></div>
|
|
391
|
-
<
|
|
392
|
-
<
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
<
|
|
396
|
-
|
|
439
|
+
<div class='menu-btns'>
|
|
440
|
+
<button class='btn open-menu'>
|
|
441
|
+
<i class="fa-solid fa-bars"></i><span> Menu</span>
|
|
442
|
+
</button>
|
|
443
|
+
<div class='context-menu collapsed'>
|
|
444
|
+
<div class='context-menu-wrapper'>
|
|
445
|
+
<button class='btn browse' data-src="<%=item.browser_url%>/browse">
|
|
446
|
+
<i class='fa-regular fa-folder-open'></i> View
|
|
447
|
+
</button>
|
|
448
|
+
<button class='btn copy-menu' data-src="<%=item.browser_url%>/browse">
|
|
449
|
+
<i class='fa-solid fa-copy'></i> Copy
|
|
450
|
+
</button>
|
|
451
|
+
<button class='btn move-menu' data-src="<%=item.browser_url%>/browse">
|
|
452
|
+
<i class="fa-solid fa-pencil"></i> Move
|
|
453
|
+
</button>
|
|
454
|
+
<button class='btn edit-menu' data-src="<%=item.browser_url%>/browse">
|
|
455
|
+
<i class='fa-solid fa-pen-to-square'></i> Edit
|
|
456
|
+
</button>
|
|
457
|
+
<button class='btn del' data-src="<%=item.url%>">
|
|
458
|
+
<i class="fa-solid fa-trash-can"></i> Delete
|
|
459
|
+
</button>
|
|
460
|
+
</div>
|
|
461
|
+
</div>
|
|
462
|
+
</div>
|
|
463
|
+
<div class='fiexible'></div>
|
|
397
464
|
<% if (item.shortcuts && item.shortcuts.length > 0) { %>
|
|
398
465
|
<div class='btns'>
|
|
399
466
|
<% item.shortcuts.forEach((btn) => { %>
|
|
@@ -404,9 +471,11 @@ body.dark .browser-options-row {
|
|
|
404
471
|
</div>
|
|
405
472
|
<% } %>
|
|
406
473
|
</div>
|
|
474
|
+
<!--
|
|
407
475
|
<div class='spinner'>
|
|
408
476
|
<i class="fa-solid fa-chevron-right"></i>
|
|
409
477
|
</div>
|
|
478
|
+
-->
|
|
410
479
|
</h3>
|
|
411
480
|
</a>
|
|
412
481
|
<% }) %>
|
|
@@ -460,7 +529,13 @@ var term
|
|
|
460
529
|
const n = new N()
|
|
461
530
|
let socket = new Socket()
|
|
462
531
|
const pull = async () => {
|
|
463
|
-
if (!term)
|
|
532
|
+
if (!term) {
|
|
533
|
+
<% if (theme === "dark") { %>
|
|
534
|
+
term = await createTerm(xtermTheme.FrontEndDelight)
|
|
535
|
+
<% } else { %>
|
|
536
|
+
term = await createTerm(xtermTheme.Tomorrow)
|
|
537
|
+
<% } %>
|
|
538
|
+
}
|
|
464
539
|
socket.close()
|
|
465
540
|
await new Promise((resolve, reject) => {
|
|
466
541
|
let cwd
|
|
@@ -608,6 +683,7 @@ const renderSearch = () => {
|
|
|
608
683
|
|
|
609
684
|
renderSearch()
|
|
610
685
|
|
|
686
|
+
|
|
611
687
|
document.querySelector("form input[type=search]").addEventListener("input", (e) => {
|
|
612
688
|
selectedIndex = 0
|
|
613
689
|
selectedBtnIndex = 0
|
|
@@ -787,9 +863,6 @@ document.addEventListener("keydown", (e) => {
|
|
|
787
863
|
}
|
|
788
864
|
});
|
|
789
865
|
document.addEventListener("click", async (e) => {
|
|
790
|
-
|
|
791
|
-
let target
|
|
792
|
-
|
|
793
866
|
if (e.target.classList.contains("shutdown")) {
|
|
794
867
|
target = e.target
|
|
795
868
|
} else {
|
|
@@ -818,12 +891,112 @@ document.addEventListener("click", async (e) => {
|
|
|
818
891
|
})
|
|
819
892
|
setTimeout(() => {
|
|
820
893
|
location.href = location.href
|
|
821
|
-
},
|
|
894
|
+
}, 500)
|
|
822
895
|
}
|
|
823
896
|
})
|
|
824
897
|
|
|
825
898
|
return
|
|
826
899
|
}
|
|
900
|
+
if (e.target.classList.contains("open-menu")) {
|
|
901
|
+
target = e.target
|
|
902
|
+
} else {
|
|
903
|
+
target = e.target.closest(".open-menu")
|
|
904
|
+
}
|
|
905
|
+
if (target) {
|
|
906
|
+
e.preventDefault()
|
|
907
|
+
e.stopPropagation()
|
|
908
|
+
let contextMenu = target.closest(".col").querySelector(".context-menu").classList.toggle("collapsed")
|
|
909
|
+
target.classList.toggle("selected")
|
|
910
|
+
return
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
if (e.target.classList.contains("move-menu")) {
|
|
914
|
+
target = e.target
|
|
915
|
+
} else {
|
|
916
|
+
target = e.target.closest(".move-menu")
|
|
917
|
+
}
|
|
918
|
+
if (target) {
|
|
919
|
+
e.preventDefault()
|
|
920
|
+
e.stopPropagation()
|
|
921
|
+
let line = target.closest(".line")
|
|
922
|
+
let title = line.getAttribute("data-title")
|
|
923
|
+
let icon = line.getAttribute("data-icon")
|
|
924
|
+
let iconpath = line.getAttribute("data-iconpath")
|
|
925
|
+
let path = line.getAttribute("data-path")
|
|
926
|
+
let description = line.getAttribute("data-description")
|
|
927
|
+
await FSEditor({
|
|
928
|
+
title,
|
|
929
|
+
description,
|
|
930
|
+
old_path: path,
|
|
931
|
+
icon,
|
|
932
|
+
iconpath,
|
|
933
|
+
move: true,
|
|
934
|
+
edit: true,
|
|
935
|
+
redirect: (new_path) => {
|
|
936
|
+
return location.href
|
|
937
|
+
}
|
|
938
|
+
})
|
|
939
|
+
return
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
if (e.target.classList.contains("copy-menu")) {
|
|
943
|
+
target = e.target
|
|
944
|
+
} else {
|
|
945
|
+
target = e.target.closest(".copy-menu")
|
|
946
|
+
}
|
|
947
|
+
if (target) {
|
|
948
|
+
e.preventDefault()
|
|
949
|
+
e.stopPropagation()
|
|
950
|
+
let line = target.closest(".line")
|
|
951
|
+
let title = line.getAttribute("data-title")
|
|
952
|
+
let icon = line.getAttribute("data-icon")
|
|
953
|
+
let iconpath = line.getAttribute("data-iconpath")
|
|
954
|
+
let path = line.getAttribute("data-path")
|
|
955
|
+
let description = line.getAttribute("data-description")
|
|
956
|
+
await FSEditor({
|
|
957
|
+
title,
|
|
958
|
+
description,
|
|
959
|
+
old_path: path,
|
|
960
|
+
icon,
|
|
961
|
+
iconpath,
|
|
962
|
+
copy: true,
|
|
963
|
+
edit: true,
|
|
964
|
+
redirect: (new_path) => {
|
|
965
|
+
return location.href
|
|
966
|
+
}
|
|
967
|
+
})
|
|
968
|
+
return
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
if (e.target.classList.contains("edit-menu")) {
|
|
972
|
+
target = e.target
|
|
973
|
+
} else {
|
|
974
|
+
target = e.target.closest(".edit-menu")
|
|
975
|
+
}
|
|
976
|
+
if (target) {
|
|
977
|
+
e.preventDefault()
|
|
978
|
+
e.stopPropagation()
|
|
979
|
+
let line = target.closest(".line")
|
|
980
|
+
let title = line.getAttribute("data-title")
|
|
981
|
+
let icon = line.getAttribute("data-icon")
|
|
982
|
+
let iconpath = line.getAttribute("data-iconpath")
|
|
983
|
+
let path = line.getAttribute("data-path")
|
|
984
|
+
let description = line.getAttribute("data-description")
|
|
985
|
+
await FSEditor({
|
|
986
|
+
title,
|
|
987
|
+
description,
|
|
988
|
+
old_path: path,
|
|
989
|
+
icon,
|
|
990
|
+
iconpath,
|
|
991
|
+
edit: true,
|
|
992
|
+
redirect: (new_path) => {
|
|
993
|
+
return location.href
|
|
994
|
+
}
|
|
995
|
+
})
|
|
996
|
+
return
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
|
|
827
1000
|
|
|
828
1001
|
|
|
829
1002
|
if (e.target.classList.contains("browse")) {
|
|
@@ -891,9 +1064,18 @@ document.addEventListener("click", async (e) => {
|
|
|
891
1064
|
|
|
892
1065
|
if (document.querySelector(".container")) {
|
|
893
1066
|
document.querySelector(".container").addEventListener("click", async (e) => {
|
|
894
|
-
let el = e.target.closest(".menu-btn")
|
|
895
|
-
if (!el) {
|
|
896
|
-
|
|
1067
|
+
//let el = e.target.closest(".menu-btn")
|
|
1068
|
+
//if (!el) {
|
|
1069
|
+
// if (el.classList.contains("menu-btn")) {
|
|
1070
|
+
// el = e.target
|
|
1071
|
+
// }
|
|
1072
|
+
//}
|
|
1073
|
+
|
|
1074
|
+
let el
|
|
1075
|
+
if (e.target.classList.contains("menu-btn")) {
|
|
1076
|
+
el = e.target
|
|
1077
|
+
} else {
|
|
1078
|
+
if (e.target.closest(".menu-btn")) {
|
|
897
1079
|
el = e.target
|
|
898
1080
|
}
|
|
899
1081
|
}
|
|
@@ -1059,34 +1241,6 @@ if (document.querySelector("#cloudflare")) {
|
|
|
1059
1241
|
})
|
|
1060
1242
|
}
|
|
1061
1243
|
<% } %>
|
|
1062
|
-
if (document.querySelector("#back")) {
|
|
1063
|
-
document.querySelector("#back").addEventListener("click", (e) => {
|
|
1064
|
-
history.back()
|
|
1065
|
-
})
|
|
1066
|
-
}
|
|
1067
|
-
if (document.querySelector("#forward")) {
|
|
1068
|
-
document.querySelector("#forward").addEventListener("click", (e) => {
|
|
1069
|
-
history.forward()
|
|
1070
|
-
})
|
|
1071
|
-
}
|
|
1072
|
-
if (document.querySelector("#genlog")) {
|
|
1073
|
-
document.querySelector("#genlog").addEventListener("click", (e) => {
|
|
1074
|
-
e.preventDefault()
|
|
1075
|
-
e.stopPropagation()
|
|
1076
|
-
e.target.innerHTML = '<i class="fa-solid fa-circle-notch fa-spin"></i>'
|
|
1077
|
-
fetch("/pinokio/log", {
|
|
1078
|
-
method: "post",
|
|
1079
|
-
}).then((res) => {
|
|
1080
|
-
console.log("RES", res)
|
|
1081
|
-
let btn = document.querySelector("#genlog")
|
|
1082
|
-
let btn2 = document.querySelector("#downloadlogs")
|
|
1083
|
-
btn2.classList.remove("hidden")
|
|
1084
|
-
btn.classList.add("hidden")
|
|
1085
|
-
btn.innerHTML = '<i class="fa-solid fa-circle-check"></i> Generated!'
|
|
1086
|
-
//btn.classList.add("hidden")
|
|
1087
|
-
})
|
|
1088
|
-
})
|
|
1089
|
-
}
|
|
1090
1244
|
|
|
1091
1245
|
</script>
|
|
1092
1246
|
</body>
|