pinokiod 1.1.37 → 1.1.39
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/package.json +1 -1
- package/server/index.js +21 -8
- package/server/views/settings.ejs +33 -31
package/package.json
CHANGED
package/server/index.js
CHANGED
|
@@ -364,17 +364,23 @@ class Server {
|
|
|
364
364
|
}]
|
|
365
365
|
console.log("agent", this.agent)
|
|
366
366
|
console.log({ configArray })
|
|
367
|
+
let folders = {}
|
|
368
|
+
if (this.kernel.homedir) {
|
|
369
|
+
folders = {
|
|
370
|
+
bin: path.resolve(this.kernel.homedir, "bin"),
|
|
371
|
+
cache: path.resolve(this.kernel.homedir, "cache"),
|
|
372
|
+
drive: path.resolve(this.kernel.homedir, "drive"),
|
|
373
|
+
}
|
|
374
|
+
}
|
|
367
375
|
res.render("settings", {
|
|
368
|
-
bin: path.resolve(this.kernel.homedir, "bin"),
|
|
369
|
-
cache: path.resolve(this.kernel.homedir, "cache"),
|
|
370
|
-
drive: path.resolve(this.kernel.homedir, "drive"),
|
|
371
376
|
version: this.version,
|
|
372
377
|
logo: this.logo,
|
|
373
378
|
theme: this.theme,
|
|
374
379
|
agent: this.agent,
|
|
375
380
|
paths,
|
|
376
381
|
config: configArray,
|
|
377
|
-
query: req.query
|
|
382
|
+
query: req.query,
|
|
383
|
+
...folders
|
|
378
384
|
})
|
|
379
385
|
} else if (stat.isFile()) {
|
|
380
386
|
console.log("isfile")
|
|
@@ -1701,17 +1707,24 @@ class Server {
|
|
|
1701
1707
|
options: ["light", "dark"]
|
|
1702
1708
|
}]
|
|
1703
1709
|
console.log("agent", this.agent)
|
|
1710
|
+
|
|
1711
|
+
let folders = {}
|
|
1712
|
+
if (this.kernel.homedir) {
|
|
1713
|
+
folders = {
|
|
1714
|
+
bin: path.resolve(this.kernel.homedir, "bin"),
|
|
1715
|
+
cache: path.resolve(this.kernel.homedir, "cache"),
|
|
1716
|
+
drive: path.resolve(this.kernel.homedir, "drive"),
|
|
1717
|
+
}
|
|
1718
|
+
}
|
|
1704
1719
|
res.render("settings", {
|
|
1705
|
-
bin: path.resolve(this.kernel.homedir, "bin"),
|
|
1706
|
-
cache: path.resolve(this.kernel.homedir, "cache"),
|
|
1707
|
-
drive: path.resolve(this.kernel.homedir, "drive"),
|
|
1708
1720
|
version: this.version,
|
|
1709
1721
|
logo: this.logo,
|
|
1710
1722
|
theme: this.theme,
|
|
1711
1723
|
agent: this.agent,
|
|
1712
1724
|
paths: [],
|
|
1713
1725
|
config: configArray,
|
|
1714
|
-
query: req.query
|
|
1726
|
+
query: req.query,
|
|
1727
|
+
...folders
|
|
1715
1728
|
})
|
|
1716
1729
|
|
|
1717
1730
|
return
|
|
@@ -273,41 +273,43 @@ hr {
|
|
|
273
273
|
<i class="fa-solid fa-circle-notch fa-spin"></i> Stand by. Do not close this window..
|
|
274
274
|
</div>
|
|
275
275
|
<hr/>
|
|
276
|
-
|
|
277
|
-
<
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
<
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
<
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
<
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
<div class='item'>
|
|
292
|
-
<label><i class="fa-solid fa-folder-open"></i> cache</label>
|
|
293
|
-
<div class='d'>Reset the cache folder and start fresh from scratch</div>
|
|
294
|
-
<div class='reset-cache-loading hidden'>
|
|
295
|
-
<i class="fa-solid fa-circle-notch fa-spin"></i> Stand by. Do not close this window..
|
|
276
|
+
<% if (locals.bin) { %>
|
|
277
|
+
<div class='troubleshoot'>
|
|
278
|
+
<h1>Troubleshoot</h1>
|
|
279
|
+
<br>
|
|
280
|
+
<br>
|
|
281
|
+
<div class='item'>
|
|
282
|
+
<label><i class="fa-solid fa-folder-open"></i> bin</label>
|
|
283
|
+
<div class='d'>Reset the bin folder and start fresh from scratch</div>
|
|
284
|
+
<div class='reset-bin-loading hidden'>
|
|
285
|
+
<i class="fa-solid fa-circle-notch fa-spin"></i> Stand by. Do not close this window..
|
|
286
|
+
</div>
|
|
287
|
+
<div>
|
|
288
|
+
<button class='btn' data-filepath="<%=bin%>"><i class="fa-solid fa-up-right-from-square"></i> View Folder</button>
|
|
289
|
+
<button class='red btn' id='del-bin'><i class="fa-solid fa-trash-can"></i> Reset</button>
|
|
290
|
+
</div>
|
|
296
291
|
</div>
|
|
297
|
-
<div>
|
|
298
|
-
<
|
|
299
|
-
<
|
|
292
|
+
<div class='item'>
|
|
293
|
+
<label><i class="fa-solid fa-folder-open"></i> cache</label>
|
|
294
|
+
<div class='d'>Reset the cache folder and start fresh from scratch</div>
|
|
295
|
+
<div class='reset-cache-loading hidden'>
|
|
296
|
+
<i class="fa-solid fa-circle-notch fa-spin"></i> Stand by. Do not close this window..
|
|
297
|
+
</div>
|
|
298
|
+
<div>
|
|
299
|
+
<button class='btn' data-filepath="<%=cache%>"><i class="fa-solid fa-up-right-from-square"></i> View Folder</button>
|
|
300
|
+
<button class='red btn' id='del-cache'><i class="fa-solid fa-trash-can"></i> Reset</button>
|
|
301
|
+
</div>
|
|
300
302
|
</div>
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
303
|
+
<div class='item'>
|
|
304
|
+
<label><i class="fa-solid fa-folder-open"></i> drive</label>
|
|
305
|
+
<div class='d'>Shared virtual drives</div>
|
|
306
|
+
<div>
|
|
307
|
+
<button class='btn' data-filepath="<%=drive%>"><i class="fa-solid fa-up-right-from-square"></i> View Folder</button>
|
|
308
|
+
</div>
|
|
307
309
|
</div>
|
|
308
310
|
</div>
|
|
309
|
-
|
|
310
|
-
|
|
311
|
+
<hr/>
|
|
312
|
+
<% } %>
|
|
311
313
|
</div>
|
|
312
314
|
</div>
|
|
313
315
|
</main>
|