pinokiod 3.9.20 → 3.9.22
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 +2 -0
- package/server/public/common.js +12 -1
- package/server/public/fseditor.js +7 -2
- package/server/public/opener.js +1 -0
- package/server/public/style.css +4 -0
- package/server/views/app.ejs +10 -3
- package/server/views/connect/x.ejs +1 -0
- package/server/views/connect.ejs +1 -0
- package/server/views/download.ejs +16 -21
- package/server/views/explore.ejs +1 -0
- package/server/views/github.ejs +1 -0
- package/server/views/help.ejs +0 -1
- package/server/views/index.ejs +10 -4
- package/server/views/network.ejs +1 -0
- package/server/views/prototype/show.ejs +3 -1
- package/server/views/settings.ejs +0 -1
package/package.json
CHANGED
package/server/index.js
CHANGED
|
@@ -276,6 +276,7 @@ class Server {
|
|
|
276
276
|
}
|
|
277
277
|
let browser_browse_url = browser_url + "/browse"
|
|
278
278
|
return {
|
|
279
|
+
filepath: this.kernel.path("api", x.name),
|
|
279
280
|
icon,
|
|
280
281
|
iconpath,
|
|
281
282
|
path: apipath,
|
|
@@ -669,6 +670,7 @@ class Server {
|
|
|
669
670
|
bin: this.kernel.bin.preset("ai"),
|
|
670
671
|
})
|
|
671
672
|
res.render("download", {
|
|
673
|
+
portal: this.portal,
|
|
672
674
|
error,
|
|
673
675
|
current: req.originalUrl,
|
|
674
676
|
install_required,
|
package/server/public/common.js
CHANGED
|
@@ -39,7 +39,18 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
|
39
39
|
document.querySelector("#create-new-folder").addEventListener("click", async (e) => {
|
|
40
40
|
e.preventDefault()
|
|
41
41
|
e.stopPropagation()
|
|
42
|
-
let
|
|
42
|
+
let result = await Swal.fire({
|
|
43
|
+
title: "Create",
|
|
44
|
+
inputPlaceholder: "Enter a folder name to create",
|
|
45
|
+
allowOutsideClick: true,
|
|
46
|
+
confirmButtonText: 'Create',
|
|
47
|
+
input: "text",
|
|
48
|
+
})
|
|
49
|
+
if (result.isDismissed) {
|
|
50
|
+
return false
|
|
51
|
+
}
|
|
52
|
+
let folder = result.value
|
|
53
|
+
//let folder = prompt("Enter a folder name to create")
|
|
43
54
|
if (folder && folder.length > 0) {
|
|
44
55
|
} else {
|
|
45
56
|
alert("Please enter a folder name")
|
|
@@ -109,7 +109,11 @@ const FSEditor = async ({title, description, old_path, icon, iconpath, redirect,
|
|
|
109
109
|
if (dirty) {
|
|
110
110
|
formData.append("icon_dirty", true)
|
|
111
111
|
}
|
|
112
|
-
|
|
112
|
+
if (iconpath) {
|
|
113
|
+
formData.append("icon_path", iconpath)
|
|
114
|
+
} else {
|
|
115
|
+
formData.append("icon_path", "icon.png")
|
|
116
|
+
}
|
|
113
117
|
let title = Swal.getPopup().querySelector('#new-folder-title').value
|
|
114
118
|
let description = Swal.getPopup().querySelector('#new-folder-description').value
|
|
115
119
|
let folder_path_el = Swal.getPopup().querySelector('#new-folder-path')
|
|
@@ -171,7 +175,8 @@ const FSEditor = async ({title, description, old_path, icon, iconpath, redirect,
|
|
|
171
175
|
dirty = true
|
|
172
176
|
// make sure the image mime type is transformed into the same type as the existing image
|
|
173
177
|
pond.setOptions({
|
|
174
|
-
imageTransformOutputMimeType: initial_file.fileType
|
|
178
|
+
//imageTransformOutputMimeType: initial_file.fileType
|
|
179
|
+
imageTransformOutputMimeType: "image/png"
|
|
175
180
|
})
|
|
176
181
|
}
|
|
177
182
|
initial_file = file
|
package/server/public/opener.js
CHANGED
package/server/public/style.css
CHANGED
|
@@ -1463,8 +1463,12 @@ body.dark .swal2-modal input {
|
|
|
1463
1463
|
border-radius: 2px !important;
|
|
1464
1464
|
}
|
|
1465
1465
|
body.dark .swal2-styled.swal2-confirm{
|
|
1466
|
+
/*
|
|
1466
1467
|
background: rgba(255,255,255,0.9) !important;
|
|
1467
1468
|
color: black;
|
|
1469
|
+
*/
|
|
1470
|
+
color: rgba(255,255,255,0.8) !important;
|
|
1471
|
+
border: 1px solid rgba(255,255,255,0.8) !important;
|
|
1468
1472
|
/*
|
|
1469
1473
|
background: var(--dark-btn-bg);
|
|
1470
1474
|
color: var(--dark-btn-color);
|
package/server/views/app.ejs
CHANGED
|
@@ -1438,7 +1438,9 @@ body.dark .appcanvas {
|
|
|
1438
1438
|
description: `<%=config.description%>`,
|
|
1439
1439
|
old_path: `<%=name%>`,
|
|
1440
1440
|
icon: `<%=config.icon%>`,
|
|
1441
|
-
|
|
1441
|
+
<% if (config.iconpath) { %>
|
|
1442
|
+
iconpath: `<%-JSON.stringify(config.iconpath).slice(1, -1)%>`,
|
|
1443
|
+
<% } %>
|
|
1442
1444
|
move: true,
|
|
1443
1445
|
edit: true,
|
|
1444
1446
|
redirect: (new_path) => {
|
|
@@ -1454,7 +1456,9 @@ body.dark .appcanvas {
|
|
|
1454
1456
|
description: `<%=config.description%>`,
|
|
1455
1457
|
old_path: `<%=name%>`,
|
|
1456
1458
|
icon: `<%=config.icon%>`,
|
|
1457
|
-
|
|
1459
|
+
<% if (config.iconpath) { %>
|
|
1460
|
+
iconpath: `<%-JSON.stringify(config.iconpath).slice(1, -1)%>`,
|
|
1461
|
+
<% } %>
|
|
1458
1462
|
edit: true,
|
|
1459
1463
|
redirect: (new_path) => {
|
|
1460
1464
|
return "./" + new_path
|
|
@@ -1469,7 +1473,9 @@ body.dark .appcanvas {
|
|
|
1469
1473
|
description: `<%=config.description%>`,
|
|
1470
1474
|
old_path: `<%=name%>`,
|
|
1471
1475
|
icon: `<%=config.icon%>`,
|
|
1472
|
-
|
|
1476
|
+
<% if (config.iconpath) { %>
|
|
1477
|
+
iconpath: `<%-JSON.stringify(config.iconpath).slice(1, -1)%>`,
|
|
1478
|
+
<% } %>
|
|
1473
1479
|
copy: true,
|
|
1474
1480
|
edit: true,
|
|
1475
1481
|
redirect: (new_path) => {
|
|
@@ -1826,6 +1832,7 @@ body.dark .appcanvas {
|
|
|
1826
1832
|
} else if (event.data.action.type === "title") {
|
|
1827
1833
|
console.log("title", event.data)
|
|
1828
1834
|
} else if (event.data.action.type === "location") {
|
|
1835
|
+
console.log("EVENT", event)
|
|
1829
1836
|
let url = event.data.action.url
|
|
1830
1837
|
console.log({ action: event.data.action })
|
|
1831
1838
|
|
|
@@ -179,6 +179,7 @@ pre {
|
|
|
179
179
|
</style>
|
|
180
180
|
<link href="/highlight.css" rel="stylesheet" />
|
|
181
181
|
<script src="/hotkeys.min.js"></script>
|
|
182
|
+
<script src="/sweetalert2.js"></script>
|
|
182
183
|
<script src="/common.js"></script>
|
|
183
184
|
<script src="/opener.js"></script>
|
|
184
185
|
<script src="/highlight.js"></script>
|
package/server/views/connect.ejs
CHANGED
|
@@ -23,20 +23,6 @@ body.frozen {
|
|
|
23
23
|
overflow: auto !important;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
body {
|
|
27
|
-
height: 100%;
|
|
28
|
-
overflow: auto;
|
|
29
|
-
background: rgb(44, 29, 22);
|
|
30
|
-
display: flex;
|
|
31
|
-
flex-direction: column;
|
|
32
|
-
}
|
|
33
|
-
body {
|
|
34
|
-
/*
|
|
35
|
-
background: white;
|
|
36
|
-
background: rgb(44, 29, 22);
|
|
37
|
-
*/
|
|
38
|
-
background: var(--dark-bg);
|
|
39
|
-
}
|
|
40
26
|
.line2 {
|
|
41
27
|
display: flex;
|
|
42
28
|
align-items: center;
|
|
@@ -128,17 +114,27 @@ body {
|
|
|
128
114
|
<% } %>
|
|
129
115
|
<header class='grabbable'>
|
|
130
116
|
<h1>
|
|
131
|
-
<a class='
|
|
117
|
+
<a class='home' href="/"><i class="fa-solid fa-house"></i></a>
|
|
118
|
+
<button class='btn2' id='back'><div><i class="fa-solid fa-chevron-left"></i></div><div>Prev</div></button>
|
|
119
|
+
<button class='btn2' id='forward'><div><i class="fa-solid fa-chevron-right"></i></div><div>Next</div></button>
|
|
120
|
+
<a class='btn2 create-new' id='create-new-folder'><div><i class='fa-solid fa-plus'></i></div><div>New</div></a>
|
|
121
|
+
<a class='btn2' id='explore' href="/?mode=explore"><div><i class="fa-solid fa-magnifying-glass"></i></div><div>Discover</div></a>
|
|
122
|
+
<a href="/network" class='btn2'><div><i class="fa-solid fa-wifi"></i></div><div>Network</div></a>
|
|
123
|
+
<a href="/connect" class='btn2'><div><i class="fa-solid fa-circle-user"></i></div><div>Connect</div></a>
|
|
132
124
|
<div class='flexible'></div>
|
|
133
125
|
<div class='nav-btns'>
|
|
134
|
-
<
|
|
135
|
-
<
|
|
136
|
-
<a
|
|
126
|
+
<a class='btn2' href="<%=portal%>" target="_blank"><div><i class="fa-solid fa-question"></i></div><div>Help</div></a>
|
|
127
|
+
<button class='btn2' id='genlog'><div><i class="fa-solid fa-laptop-code"></i></div><div>Logs</div></button>
|
|
128
|
+
<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>
|
|
137
129
|
<a class='btn2' href="/?mode=settings"><div><i class="fa-solid fa-gear"></i></div><div>Settings</div></a>
|
|
138
|
-
|
|
130
|
+
<% if (agent === "electron") { %>
|
|
131
|
+
<a href="/" target="_blank" class='btn2' features="browser"><div><i class="fa-solid fa-square-up-right"></i></div><div>Open</div></a>
|
|
132
|
+
<% } else { %>
|
|
133
|
+
<a href="/" target="_blank" class='btn2'><div><i class="fa-solid fa-square-up-right"></i></div><div>Open</div></a>
|
|
134
|
+
<% } %>
|
|
135
|
+
<button id='new-window' title='open a new window' class='btn2'><div><i class="fa-solid fa-plus"></i></div><div>Window</div></button>
|
|
139
136
|
</div>
|
|
140
137
|
</h1>
|
|
141
|
-
</h1>
|
|
142
138
|
</header>
|
|
143
139
|
<% if (requirements_pending) { %>
|
|
144
140
|
<div class='requirements'>
|
|
@@ -189,7 +185,6 @@ body {
|
|
|
189
185
|
<% } %>
|
|
190
186
|
<script>
|
|
191
187
|
document.addEventListener("DOMContentLoaded", async () => {
|
|
192
|
-
Reporter()
|
|
193
188
|
<% if (error) { %>
|
|
194
189
|
document.querySelector(".requirements .content").innerHTML = '<div class="loading"><i class="fa-solid fa-circle-exclamation"></i> <%=error%></div>'
|
|
195
190
|
<% } %>
|
package/server/views/explore.ejs
CHANGED
package/server/views/github.ejs
CHANGED
package/server/views/help.ejs
CHANGED
package/server/views/index.ejs
CHANGED
|
@@ -169,10 +169,13 @@ body.dark .open-menu, body.dark .browse {
|
|
|
169
169
|
background: black !important;
|
|
170
170
|
color: white !important;
|
|
171
171
|
}
|
|
172
|
+
.open-menu:hover, .browse:hover, body.dark .open-menu:hover, body.dark .browse:hover {
|
|
173
|
+
color: royalblue !important;
|
|
174
|
+
}
|
|
172
175
|
.open-menu, .browse {
|
|
173
176
|
width: 80px;
|
|
174
177
|
border-radius: 0 !important;
|
|
175
|
-
background: rgba(0,0,0,0.
|
|
178
|
+
background: rgba(0,0,0,0.04) !important;
|
|
176
179
|
color: black !important;
|
|
177
180
|
/*
|
|
178
181
|
border: 1px solid rgba(0, 0, 0, 0.3);
|
|
@@ -371,7 +374,7 @@ body.dark .open-menu, body.dark .browse {
|
|
|
371
374
|
<% } %>
|
|
372
375
|
</div>
|
|
373
376
|
<div class='col'>
|
|
374
|
-
<div class='uri'><i class="fa-regular fa-folder"></i><%=item.
|
|
377
|
+
<div class='uri'><i class="fa-regular fa-folder"></i><%=item.filepath%></div>
|
|
375
378
|
<div class='title'><%=item.name%></div>
|
|
376
379
|
<div class='description'><%=item.description%></div>
|
|
377
380
|
<div class='menu-btns'>
|
|
@@ -446,7 +449,7 @@ body.dark .open-menu, body.dark .browse {
|
|
|
446
449
|
<% } %>
|
|
447
450
|
</div>
|
|
448
451
|
<div class='col'>
|
|
449
|
-
<div class='uri'><i class="fa-regular fa-folder"></i><%=item.
|
|
452
|
+
<div class='uri'><i class="fa-regular fa-folder"></i><%=item.filepath%></div>
|
|
450
453
|
<div class='title'><%=item.name%></div>
|
|
451
454
|
<div class='description'><%=item.description%></div>
|
|
452
455
|
<div class='menu-btns'>
|
|
@@ -458,11 +461,14 @@ body.dark .open-menu, body.dark .browse {
|
|
|
458
461
|
</button>
|
|
459
462
|
<div class='context-menu collapsed'>
|
|
460
463
|
<div class='context-menu-wrapper'>
|
|
464
|
+
<button class='btn' data-filepath="<%=item.filepath%>">
|
|
465
|
+
<i class="fa-solid fa-folder-open"></i> Open</button>
|
|
466
|
+
</button>
|
|
461
467
|
<button class='btn copy-menu' data-src="<%=item.browser_url%>/browse">
|
|
462
468
|
<i class='fa-solid fa-copy'></i> Copy
|
|
463
469
|
</button>
|
|
464
470
|
<button class='btn move-menu' data-src="<%=item.browser_url%>/browse">
|
|
465
|
-
<i class="fa-solid fa-
|
|
471
|
+
<i class="fa-solid fa-right-to-bracket"></i> Move
|
|
466
472
|
</button>
|
|
467
473
|
<button class='btn edit-menu' data-src="<%=item.browser_url%>/browse">
|
|
468
474
|
<i class='fa-solid fa-pen-to-square'></i> Edit
|
package/server/views/network.ejs
CHANGED
|
@@ -233,7 +233,6 @@ hr {
|
|
|
233
233
|
<script src="/xterm-addon-fit.js"></script>
|
|
234
234
|
<script src="/xterm-addon-web-links.js"></script>
|
|
235
235
|
<script src="/xterm-theme.js"></script>
|
|
236
|
-
<script src="/sweetalert2.js"></script>
|
|
237
236
|
<script src="/install.js"></script>
|
|
238
237
|
<script src="/timeago.min.js"></script>
|
|
239
238
|
<script src="/common.js"></script>
|