pinokiod 3.50.0 → 3.52.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/3 +1 -0
- package/kernel/gitconfig_template +3 -1
- package/kernel/index.js +11 -0
- package/kernel/scripts/git/create +1 -2
- package/kernel/scripts/git/push +1 -1
- package/package.json +6 -2
- package/server/index.js +44 -16
- package/server/public/common.js +0 -4
- package/server/public/serve/directory.html +106 -0
- package/server/public/serve/icons/application_xp.png +0 -0
- package/server/public/serve/icons/application_xp_terminal.png +0 -0
- package/server/public/serve/icons/box.png +0 -0
- package/server/public/serve/icons/cd.png +0 -0
- package/server/public/serve/icons/controller.png +0 -0
- package/server/public/serve/icons/drive.png +0 -0
- package/server/public/serve/icons/film.png +0 -0
- package/server/public/serve/icons/folder.png +0 -0
- package/server/public/serve/icons/font.png +0 -0
- package/server/public/serve/icons/image.png +0 -0
- package/server/public/serve/icons/map.png +0 -0
- package/server/public/serve/icons/page.png +0 -0
- package/server/public/serve/icons/page_add.png +0 -0
- package/server/public/serve/icons/page_attach.png +0 -0
- package/server/public/serve/icons/page_code.png +0 -0
- package/server/public/serve/icons/page_copy.png +0 -0
- package/server/public/serve/icons/page_delete.png +0 -0
- package/server/public/serve/icons/page_edit.png +0 -0
- package/server/public/serve/icons/page_error.png +0 -0
- package/server/public/serve/icons/page_excel.png +0 -0
- package/server/public/serve/icons/page_find.png +0 -0
- package/server/public/serve/icons/page_gear.png +0 -0
- package/server/public/serve/icons/page_go.png +0 -0
- package/server/public/serve/icons/page_green.png +0 -0
- package/server/public/serve/icons/page_key.png +0 -0
- package/server/public/serve/icons/page_lightning.png +0 -0
- package/server/public/serve/icons/page_link.png +0 -0
- package/server/public/serve/icons/page_paintbrush.png +0 -0
- package/server/public/serve/icons/page_paste.png +0 -0
- package/server/public/serve/icons/page_red.png +0 -0
- package/server/public/serve/icons/page_refresh.png +0 -0
- package/server/public/serve/icons/page_save.png +0 -0
- package/server/public/serve/icons/page_white.png +0 -0
- package/server/public/serve/icons/page_white_acrobat.png +0 -0
- package/server/public/serve/icons/page_white_actionscript.png +0 -0
- package/server/public/serve/icons/page_white_add.png +0 -0
- package/server/public/serve/icons/page_white_c.png +0 -0
- package/server/public/serve/icons/page_white_camera.png +0 -0
- package/server/public/serve/icons/page_white_cd.png +0 -0
- package/server/public/serve/icons/page_white_code.png +0 -0
- package/server/public/serve/icons/page_white_code_red.png +0 -0
- package/server/public/serve/icons/page_white_coldfusion.png +0 -0
- package/server/public/serve/icons/page_white_compressed.png +0 -0
- package/server/public/serve/icons/page_white_copy.png +0 -0
- package/server/public/serve/icons/page_white_cplusplus.png +0 -0
- package/server/public/serve/icons/page_white_csharp.png +0 -0
- package/server/public/serve/icons/page_white_cup.png +0 -0
- package/server/public/serve/icons/page_white_database.png +0 -0
- package/server/public/serve/icons/page_white_delete.png +0 -0
- package/server/public/serve/icons/page_white_dvd.png +0 -0
- package/server/public/serve/icons/page_white_edit.png +0 -0
- package/server/public/serve/icons/page_white_error.png +0 -0
- package/server/public/serve/icons/page_white_excel.png +0 -0
- package/server/public/serve/icons/page_white_find.png +0 -0
- package/server/public/serve/icons/page_white_flash.png +0 -0
- package/server/public/serve/icons/page_white_freehand.png +0 -0
- package/server/public/serve/icons/page_white_gear.png +0 -0
- package/server/public/serve/icons/page_white_get.png +0 -0
- package/server/public/serve/icons/page_white_go.png +0 -0
- package/server/public/serve/icons/page_white_h.png +0 -0
- package/server/public/serve/icons/page_white_horizontal.png +0 -0
- package/server/public/serve/icons/page_white_key.png +0 -0
- package/server/public/serve/icons/page_white_lightning.png +0 -0
- package/server/public/serve/icons/page_white_link.png +0 -0
- package/server/public/serve/icons/page_white_magnify.png +0 -0
- package/server/public/serve/icons/page_white_medal.png +0 -0
- package/server/public/serve/icons/page_white_office.png +0 -0
- package/server/public/serve/icons/page_white_paint.png +0 -0
- package/server/public/serve/icons/page_white_paintbrush.png +0 -0
- package/server/public/serve/icons/page_white_paste.png +0 -0
- package/server/public/serve/icons/page_white_php.png +0 -0
- package/server/public/serve/icons/page_white_picture.png +0 -0
- package/server/public/serve/icons/page_white_powerpoint.png +0 -0
- package/server/public/serve/icons/page_white_put.png +0 -0
- package/server/public/serve/icons/page_white_ruby.png +0 -0
- package/server/public/serve/icons/page_white_stack.png +0 -0
- package/server/public/serve/icons/page_white_star.png +0 -0
- package/server/public/serve/icons/page_white_swoosh.png +0 -0
- package/server/public/serve/icons/page_white_text.png +0 -0
- package/server/public/serve/icons/page_white_text_width.png +0 -0
- package/server/public/serve/icons/page_white_tux.png +0 -0
- package/server/public/serve/icons/page_white_vector.png +0 -0
- package/server/public/serve/icons/page_white_visualstudio.png +0 -0
- package/server/public/serve/icons/page_white_width.png +0 -0
- package/server/public/serve/icons/page_white_word.png +0 -0
- package/server/public/serve/icons/page_white_world.png +0 -0
- package/server/public/serve/icons/page_white_wrench.png +0 -0
- package/server/public/serve/icons/page_white_zip.png +0 -0
- package/server/public/serve/icons/page_word.png +0 -0
- package/server/public/serve/icons/page_world.png +0 -0
- package/server/public/serve/style.css +308 -0
- package/server/public/style.css +41 -2
- package/server/serveIndex.js +691 -0
- package/server/views/app.ejs +310 -88
- package/server/views/columns.ejs +1 -1
- package/server/views/connect/x.ejs +1 -0
- package/server/views/connect.ejs +1 -0
- package/server/views/container.ejs +1 -0
- package/server/views/download.ejs +1 -0
- package/server/views/explore.ejs +1 -0
- package/server/views/form.ejs +1 -0
- package/server/views/frame.ejs +1 -0
- package/server/views/github.ejs +1 -0
- package/server/views/help.ejs +1 -0
- package/server/views/index.ejs +1 -0
- package/server/views/init/index.ejs +2 -1
- package/server/views/mini.ejs +1 -0
- package/server/views/net.ejs +1 -0
- package/server/views/network.ejs +115 -17
- package/server/views/prototype/index.ejs +1 -0
- package/server/views/review.ejs +1 -0
- package/server/views/rows.ejs +1 -1
- package/server/views/screenshots.ejs +1 -0
- package/server/views/settings.ejs +1 -0
- package/server/views/setup.ejs +1 -0
- package/server/views/setup_home.ejs +1 -0
- package/server/views/tools.ejs +1 -0
package/kernel/index.js
CHANGED
|
@@ -732,6 +732,15 @@ class Kernel {
|
|
|
732
732
|
kill() {
|
|
733
733
|
process.kill(process.pid, "SIGTERM")
|
|
734
734
|
}
|
|
735
|
+
/// async fileserver() {
|
|
736
|
+
/// await this.exec({
|
|
737
|
+
/// message: `npx -y filexplorer --serveDirectory ${this.homedir}`
|
|
738
|
+
/// }, (e) => {
|
|
739
|
+
/// process.stdout.write(e.raw)
|
|
740
|
+
/// }).then(() => {
|
|
741
|
+
/// console.log("DONE")
|
|
742
|
+
/// })
|
|
743
|
+
/// }
|
|
735
744
|
async init(options) {
|
|
736
745
|
|
|
737
746
|
let home = this.store.get("home")
|
|
@@ -919,6 +928,8 @@ class Kernel {
|
|
|
919
928
|
let pwpath = this.bin.path("playwright/node_modules/playwright")
|
|
920
929
|
this.playwright = (await this.loader.load(pwpath)).resolved
|
|
921
930
|
|
|
931
|
+
//await this.fileserver()
|
|
932
|
+
|
|
922
933
|
// get env
|
|
923
934
|
if (!this.launch_complete) {
|
|
924
935
|
let interval = setInterval(async () => {
|
package/kernel/scripts/git/push
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pinokiod",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.52.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -13,8 +13,10 @@
|
|
|
13
13
|
"@homebridge/node-pty-prebuilt-multiarch": "0.12.0-beta.5",
|
|
14
14
|
"@xterm/headless": "^5.5.0",
|
|
15
15
|
"7zip-min-win-asar-support": "^1.4.4",
|
|
16
|
+
"accepts": "^1.3.8",
|
|
16
17
|
"async-retry": "^1.3.3",
|
|
17
18
|
"axios": "^1.4.0",
|
|
19
|
+
"batch": "^0.6.1",
|
|
18
20
|
"clear-module": "^4.1.2",
|
|
19
21
|
"compressing": "^1.10.0",
|
|
20
22
|
"cookie-parser": "^1.4.6",
|
|
@@ -27,6 +29,7 @@
|
|
|
27
29
|
"dotenv": "^16.4.5",
|
|
28
30
|
"ejs": "^3.1.9",
|
|
29
31
|
"eol": "^0.9.1",
|
|
32
|
+
"escape-html": "^1.0.3",
|
|
30
33
|
"express": "^4.18.2",
|
|
31
34
|
"express-http-proxy-cp": "^2.0.3",
|
|
32
35
|
"express-session": "^1.17.3",
|
|
@@ -38,6 +41,7 @@
|
|
|
38
41
|
"glob-gitignore": "^1.0.14",
|
|
39
42
|
"go-get-folder-size": "^0.5.5",
|
|
40
43
|
"gray-matter": "^4.0.3",
|
|
44
|
+
"http-errors": "^2.0.0",
|
|
41
45
|
"http-proxy": "^1.18.1",
|
|
42
46
|
"http-proxy-middleware": "^3.0.0",
|
|
43
47
|
"http-terminator": "^3.2.0",
|
|
@@ -59,6 +63,7 @@
|
|
|
59
63
|
"node-notifier": "^10.0.1",
|
|
60
64
|
"normalize-path": "^3.0.0",
|
|
61
65
|
"p-limit": "^3.1.0",
|
|
66
|
+
"parseurl": "^1.3.3",
|
|
62
67
|
"pdrive": "^0.0.27",
|
|
63
68
|
"portfinder-cp": "^1.0.34",
|
|
64
69
|
"proxy-agent": "^6.5.0",
|
|
@@ -67,7 +72,6 @@
|
|
|
67
72
|
"rimraf": "^5.0.0",
|
|
68
73
|
"sanitize-filename": "^1.6.3",
|
|
69
74
|
"semver": "^7.5.4",
|
|
70
|
-
"serve-index": "^1.9.1",
|
|
71
75
|
"shell-path": "^2.0.0",
|
|
72
76
|
"sudo-prompt-programfiles-x86": "^9.2.10",
|
|
73
77
|
"symlink-dir": "^5.2.1",
|
package/server/index.js
CHANGED
|
@@ -23,7 +23,7 @@ const fse = require('fs-extra')
|
|
|
23
23
|
const QRCode = require('qrcode')
|
|
24
24
|
const axios = require('axios')
|
|
25
25
|
const crypto = require('crypto')
|
|
26
|
-
const serveIndex = require('
|
|
26
|
+
const serveIndex = require('./serveIndex')
|
|
27
27
|
|
|
28
28
|
const git = require('isomorphic-git')
|
|
29
29
|
const http = require('isomorphic-git/http/node')
|
|
@@ -249,6 +249,7 @@ class Server {
|
|
|
249
249
|
}
|
|
250
250
|
let dev_url = browser_url + "/dev"
|
|
251
251
|
let review_url = browser_url + "/review"
|
|
252
|
+
let files_url = "/asset/api/" + x.name
|
|
252
253
|
|
|
253
254
|
let dns = this.kernel.pinokio_configs[x.name].dns
|
|
254
255
|
let routes = dns["@"]
|
|
@@ -275,6 +276,7 @@ class Server {
|
|
|
275
276
|
path: uri,
|
|
276
277
|
dev_url,
|
|
277
278
|
review_url,
|
|
279
|
+
files_url,
|
|
278
280
|
}
|
|
279
281
|
})
|
|
280
282
|
}
|
|
@@ -308,6 +310,14 @@ class Server {
|
|
|
308
310
|
remote = config["remote \"origin\""].url
|
|
309
311
|
}
|
|
310
312
|
|
|
313
|
+
// Get all remotes
|
|
314
|
+
let remotes = []
|
|
315
|
+
try {
|
|
316
|
+
remotes = await git.listRemotes({ fs, dir, verbose: true })
|
|
317
|
+
} catch (e) {
|
|
318
|
+
console.log("Remotes error", e)
|
|
319
|
+
}
|
|
320
|
+
|
|
311
321
|
let branch = await git.currentBranch({ fs, dir, fullname: false });
|
|
312
322
|
|
|
313
323
|
const remote2 = await git.getConfig({
|
|
@@ -348,7 +358,7 @@ class Server {
|
|
|
348
358
|
}
|
|
349
359
|
})
|
|
350
360
|
}
|
|
351
|
-
return { ref, config, remote, connected, log, branch, branches, dir }
|
|
361
|
+
return { ref, config, remote, remotes, connected, log, branch, branches, dir }
|
|
352
362
|
}
|
|
353
363
|
async init_env(env_dir_path, options) {
|
|
354
364
|
let current = this.kernel.path(env_dir_path, "ENVIRONMENT")
|
|
@@ -610,10 +620,14 @@ class Server {
|
|
|
610
620
|
theme: this.theme,
|
|
611
621
|
agent: this.agent,
|
|
612
622
|
src: "/_api/" + name,
|
|
623
|
+
//asset: "/asset/api/" + name,
|
|
624
|
+
asset: "/files/api/" + name,
|
|
613
625
|
logs: "/_api/" + name + "/logs",
|
|
614
626
|
execUrl: "/api/" + name,
|
|
615
627
|
git_monitor_url: `/gitcommit/HEAD/${name}`,
|
|
616
628
|
git_history_url: `/info/git/HEAD/${name}`,
|
|
629
|
+
git_push_url: `/run/scripts/git/push.json?cwd=${encodeURIComponent(this.kernel.path('api', name))}`,
|
|
630
|
+
git_create_url: `/run/scripts/git/create.json?cwd=${encodeURIComponent(this.kernel.path('api', name))}`
|
|
617
631
|
// rawpath,
|
|
618
632
|
}
|
|
619
633
|
// if (!this.kernel.proto.config) {
|
|
@@ -2913,14 +2927,26 @@ class Server {
|
|
|
2913
2927
|
this.kernel.path("web/views"),
|
|
2914
2928
|
path.resolve(__dirname, "views")
|
|
2915
2929
|
])
|
|
2916
|
-
let serve = express.static(this.kernel.homedir, { fallthrough: true })
|
|
2930
|
+
let serve = express.static(this.kernel.homedir, { fallthrough: true, })
|
|
2931
|
+
let serve2 = express.static(this.kernel.homedir, { index: false, fallthrough: true, })
|
|
2917
2932
|
let http_serve = express.static(this.kernel.homedir, {
|
|
2918
2933
|
redirect: true,
|
|
2919
2934
|
})
|
|
2920
2935
|
let https_serve = express.static(this.kernel.homedir, {
|
|
2921
2936
|
redirect: false,
|
|
2922
2937
|
})
|
|
2923
|
-
this.app.use('/asset', serve, serveIndex(this.kernel.homedir, {
|
|
2938
|
+
this.app.use('/asset', serve, serveIndex(this.kernel.homedir, {icons: true, hidden: true, theme: this.theme }))
|
|
2939
|
+
// this.app.use("/asset", async (req, res, next) => {
|
|
2940
|
+
// let asset_path = this.kernel.path(req.path.slice(1), "index.html")
|
|
2941
|
+
// let exists = await this.exists(asset_path)
|
|
2942
|
+
// if (exists) {
|
|
2943
|
+
// return res.sendFile(asset_path)
|
|
2944
|
+
// } else {
|
|
2945
|
+
// let chunks = req.path.slice(1).split("/")
|
|
2946
|
+
// let parent_path = chunks.slice(0, -1).join("/")
|
|
2947
|
+
// res.redirect("/asset/" + parent_path)
|
|
2948
|
+
// }
|
|
2949
|
+
// })
|
|
2924
2950
|
this.app.use('/asset', (req, res, next) => {
|
|
2925
2951
|
if (req.path.match(/\.(png|jpg|jpeg|gif|ico|svg)$/)) {
|
|
2926
2952
|
res.sendFile(path.resolve(__dirname, 'public', 'pinokio-black.png'));
|
|
@@ -2928,17 +2954,7 @@ class Server {
|
|
|
2928
2954
|
next();
|
|
2929
2955
|
}
|
|
2930
2956
|
});
|
|
2931
|
-
this.app.use(
|
|
2932
|
-
let asset_path = this.kernel.path(req.path.slice(1), "index.html")
|
|
2933
|
-
let exists = await this.exists(asset_path)
|
|
2934
|
-
if (exists) {
|
|
2935
|
-
return res.sendFile(asset_path)
|
|
2936
|
-
} else {
|
|
2937
|
-
let chunks = req.path.slice(1).split("/")
|
|
2938
|
-
let parent_path = chunks.slice(0, -1).join("/")
|
|
2939
|
-
res.redirect("/asset/" + parent_path)
|
|
2940
|
-
}
|
|
2941
|
-
})
|
|
2957
|
+
this.app.use('/files', serve2, serveIndex(this.kernel.homedir, {icons: true, hidden: true, theme: this.theme }))
|
|
2942
2958
|
} else {
|
|
2943
2959
|
this.app.set("views", [
|
|
2944
2960
|
path.resolve(__dirname, "views")
|
|
@@ -3614,7 +3630,19 @@ class Server {
|
|
|
3614
3630
|
}))
|
|
3615
3631
|
this.app.post("/openfs", ex(async (req, res) => {
|
|
3616
3632
|
//Util.openfs(req.body.path, req.body.mode)
|
|
3617
|
-
|
|
3633
|
+
if (req.body.name) {
|
|
3634
|
+
let filepath = this.kernel.path("api", req.body.name)
|
|
3635
|
+
Util.openfs(filepath, req.body, this.kernel)
|
|
3636
|
+
} else if (req.body.asset_path) {
|
|
3637
|
+
// asset_path : /asset/...
|
|
3638
|
+
// relpath : ...
|
|
3639
|
+
let relpath = req.body.asset_path.split("/").filter((x) => { return x }).slice(1).join("/")
|
|
3640
|
+
let filepath = this.kernel.path(relpath)
|
|
3641
|
+
console.log({ filepath, relpath })
|
|
3642
|
+
Util.openfs(filepath, req.body, this.kernel)
|
|
3643
|
+
} else if (req.body.path) {
|
|
3644
|
+
Util.openfs(req.body.path, req.body, this.kernel)
|
|
3645
|
+
}
|
|
3618
3646
|
res.json({ success: true })
|
|
3619
3647
|
}))
|
|
3620
3648
|
this.app.post("/keys", ex(async (req, res) => {
|
package/server/public/common.js
CHANGED
|
@@ -319,7 +319,6 @@ function initTippy() {
|
|
|
319
319
|
}
|
|
320
320
|
});
|
|
321
321
|
} catch(e) {
|
|
322
|
-
console.log(e);
|
|
323
322
|
}
|
|
324
323
|
}
|
|
325
324
|
|
|
@@ -331,13 +330,10 @@ function updateTippyPlacement(instance) {
|
|
|
331
330
|
|
|
332
331
|
//if (isHeaderElement && isMobileOrMinimized) {
|
|
333
332
|
if (isMinimized) {
|
|
334
|
-
console.log(">1")
|
|
335
333
|
instance.setProps({ placement: 'right' });
|
|
336
334
|
} else if (isSidebarTab) {
|
|
337
|
-
console.log(">2")
|
|
338
335
|
instance.setProps({ placement: 'left' });
|
|
339
336
|
} else {
|
|
340
|
-
console.log(">3")
|
|
341
337
|
instance.setProps({ placement: 'top' });
|
|
342
338
|
}
|
|
343
339
|
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset='utf-8'>
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
|
6
|
+
<title>listing directory {directory}</title>
|
|
7
|
+
<style>{style}</style>
|
|
8
|
+
<script>
|
|
9
|
+
function $(id){
|
|
10
|
+
var el = 'string' == typeof id
|
|
11
|
+
? document.getElementById(id)
|
|
12
|
+
: id;
|
|
13
|
+
|
|
14
|
+
el.on = function(event, fn){
|
|
15
|
+
if ('content loaded' == event) {
|
|
16
|
+
event = window.attachEvent ? "load" : "DOMContentLoaded";
|
|
17
|
+
}
|
|
18
|
+
el.addEventListener
|
|
19
|
+
? el.addEventListener(event, fn, false)
|
|
20
|
+
: el.attachEvent("on" + event, fn);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
el.all = function(selector){
|
|
24
|
+
return $(el.querySelectorAll(selector));
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
el.each = function(fn){
|
|
28
|
+
for (var i = 0, len = el.length; i < len; ++i) {
|
|
29
|
+
fn($(el[i]), i);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
el.getClasses = function(){
|
|
34
|
+
return this.getAttribute('class').split(/\s+/);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
el.addClass = function(name){
|
|
38
|
+
var classes = this.getAttribute('class');
|
|
39
|
+
el.setAttribute('class', classes
|
|
40
|
+
? classes + ' ' + name
|
|
41
|
+
: name);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
el.removeClass = function(name){
|
|
45
|
+
var classes = this.getClasses().filter(function(curr){
|
|
46
|
+
return curr != name;
|
|
47
|
+
});
|
|
48
|
+
this.setAttribute('class', classes.join(' '));
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
return el;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function search() {
|
|
55
|
+
var str = $('search').value.toLowerCase();
|
|
56
|
+
var links = $('files').all('a');
|
|
57
|
+
|
|
58
|
+
if (str.length > 0) {
|
|
59
|
+
$('files').addClass("searching")
|
|
60
|
+
} else {
|
|
61
|
+
$('files').removeClass("searching")
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
links.each(function(link){
|
|
65
|
+
var text = link.textContent.toLowerCase();
|
|
66
|
+
|
|
67
|
+
if ('..' == text) return;
|
|
68
|
+
if (str.length && ~text.indexOf(str)) {
|
|
69
|
+
link.addClass('highlight');
|
|
70
|
+
} else {
|
|
71
|
+
link.removeClass('highlight');
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
$(window).on('content loaded', function(){
|
|
77
|
+
$('search').on('keyup', search);
|
|
78
|
+
$("open").on("click", async (e) => {
|
|
79
|
+
console.log("location", location)
|
|
80
|
+
await fetch("/openfs", {
|
|
81
|
+
method: "post",
|
|
82
|
+
headers: {
|
|
83
|
+
"Content-Type": "application/json"
|
|
84
|
+
},
|
|
85
|
+
body: JSON.stringify({
|
|
86
|
+
asset_path: location.pathname,
|
|
87
|
+
mode: "open",
|
|
88
|
+
})
|
|
89
|
+
}).then((res) => {
|
|
90
|
+
return res.json()
|
|
91
|
+
})
|
|
92
|
+
})
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
</script>
|
|
97
|
+
</head>
|
|
98
|
+
<body class="directory {theme}">
|
|
99
|
+
<button id='open'>Open File Explorer</button>
|
|
100
|
+
<input id="search" type="text" placeholder="Search" autocomplete="off" />
|
|
101
|
+
<div id="wrapper">
|
|
102
|
+
<h1><a href="/">~</a>{linked-path}</h1>
|
|
103
|
+
{files}
|
|
104
|
+
</div>
|
|
105
|
+
</body>
|
|
106
|
+
</html>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|