pinokiod 1.1.51 → 1.1.52
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 +2 -2
- package/server/index.js +4 -4
- package/server/views/browser.ejs +13 -49
- package/server/views/settings.ejs +22 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pinokiod",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.52",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"jsonpath-plus": "^7.2.0",
|
|
38
38
|
"key-store": "^1.2.0",
|
|
39
39
|
"lodash": "^4.17.21",
|
|
40
|
-
"lproxy": "^0.0.
|
|
40
|
+
"lproxy": "^0.0.8",
|
|
41
41
|
"marked": "^5.0.1",
|
|
42
42
|
"mime-types": "^2.1.35",
|
|
43
43
|
"multer": "^1.4.5-lts.1",
|
package/server/index.js
CHANGED
|
@@ -351,8 +351,8 @@ class Server {
|
|
|
351
351
|
let configArray = [{
|
|
352
352
|
key: "home",
|
|
353
353
|
description: [
|
|
354
|
-
"*
|
|
355
|
-
"*
|
|
354
|
+
"* NO white spaces (' ')",
|
|
355
|
+
"* NO exFAT drives",
|
|
356
356
|
],
|
|
357
357
|
val: this.kernel.homedir,
|
|
358
358
|
placeholder: "Enter the absolute path to use as your Pinokio home folder (D:\\pinokio, /Users/alice/pinokiofs, etc.)"
|
|
@@ -1700,8 +1700,8 @@ class Server {
|
|
|
1700
1700
|
let configArray = [{
|
|
1701
1701
|
key: "home",
|
|
1702
1702
|
description: [
|
|
1703
|
-
"*
|
|
1704
|
-
"*
|
|
1703
|
+
"* NO white spaces (' ')",
|
|
1704
|
+
"* NO exFAT drives",
|
|
1705
1705
|
],
|
|
1706
1706
|
val: this.kernel.homedir ? this.kernel.homedir : path.resolve(os.homedir(), "pinokio"),
|
|
1707
1707
|
placeholder: "Enter the absolute path to use as your Pinokio home folder (D:\\pinokio, /Users/alice/pinokiofs, etc.)"
|
package/server/views/browser.ejs
CHANGED
|
@@ -922,7 +922,6 @@ const renderSelection = (e, force) => {
|
|
|
922
922
|
}
|
|
923
923
|
} else {
|
|
924
924
|
console.log("# 14")
|
|
925
|
-
// document.querySelector(".bar").classList.add("hidden")
|
|
926
925
|
document.querySelector(".container").classList.remove("active")
|
|
927
926
|
document.querySelector("aside").classList.add("active")
|
|
928
927
|
}
|
|
@@ -1051,7 +1050,8 @@ const addTab = async (url) => {
|
|
|
1051
1050
|
if (document.querySelector("#menu")) {
|
|
1052
1051
|
document.querySelector("#menu").addEventListener("click", async (e) => {
|
|
1053
1052
|
location.hash = ""
|
|
1054
|
-
|
|
1053
|
+
refresh()
|
|
1054
|
+
// renderSelection()
|
|
1055
1055
|
})
|
|
1056
1056
|
}
|
|
1057
1057
|
document.querySelector(".app-info").addEventListener("click", async (e) => {
|
|
@@ -1199,54 +1199,13 @@ document.querySelector("aside").addEventListener("click", async (e) => {
|
|
|
1199
1199
|
|
|
1200
1200
|
})
|
|
1201
1201
|
const refresh = async () => {
|
|
1202
|
+
console.log("REFRESH")
|
|
1202
1203
|
const html = await fetch("<%=sidebar%>").then((res) => {
|
|
1203
1204
|
return res.text()
|
|
1204
1205
|
})
|
|
1205
|
-
/*
|
|
1206
|
-
const res = await fetch("<%=sidebar%>").then((res) => {
|
|
1207
|
-
return res.json()
|
|
1208
|
-
})
|
|
1209
|
-
const html = res.config.menu.map((item, index) => {
|
|
1210
|
-
console.log("item", item)
|
|
1211
|
-
if (item.btn) {
|
|
1212
|
-
return `<a data-index="${index+1}" target="${item.src}" href="${item.href}" class='btn header-item selectable frame-link'>
|
|
1213
|
-
<div class='tab'>${item.btn}</div>
|
|
1214
|
-
${item.running ? "<i class='fa-solid fa-spin fa-circle-notch'></i>" : ""}
|
|
1215
|
-
</a>`
|
|
1216
|
-
} else if (item.label) {
|
|
1217
|
-
return ""
|
|
1218
|
-
}
|
|
1219
|
-
}).join("")
|
|
1220
|
-
console.log("refresh", html)
|
|
1221
|
-
*/
|
|
1222
1206
|
document.querySelector(".menu").innerHTML = html
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
// update the frames so the name matches the tab links
|
|
1226
|
-
|
|
1227
|
-
// 1. iterate through all the "h" menu items
|
|
1228
|
-
// 2. for each tab that starts with "h" (hard), iterate through all iframes
|
|
1229
|
-
// 3. to find a frame whose src.includes(item.href)
|
|
1230
|
-
// 4. update the frame's name to the target attribute
|
|
1231
|
-
|
|
1232
|
-
// let hardFrames = document.querySelectorAll(".browserview iframe[name^=h]")
|
|
1233
|
-
// for(let frame of hardFrames) {
|
|
1234
|
-
// frame.removeAttribute("name")
|
|
1235
|
-
// location.hash = ""
|
|
1236
|
-
// }
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
1207
|
location.hash = ""
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
//
|
|
1245
|
-
|
|
1246
1208
|
renderSelection()
|
|
1247
|
-
// cursorIndex = 0
|
|
1248
|
-
//renderCursor()
|
|
1249
|
-
|
|
1250
1209
|
}
|
|
1251
1210
|
window.addEventListener('message', (event) => {
|
|
1252
1211
|
console.log("Message received from the child: ", event.data); // Message received from child
|
|
@@ -1265,11 +1224,16 @@ window.addEventListener('message', (event) => {
|
|
|
1265
1224
|
document.querySelector("#location").value = url
|
|
1266
1225
|
}
|
|
1267
1226
|
} else if (event.data.type) {
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1227
|
+
let asideHidden = (window.getComputedStyle(document.querySelector("aside")).display === "none")
|
|
1228
|
+
console.log("asideHidden", asideHidden)
|
|
1229
|
+
if (!asideHidden) {
|
|
1230
|
+
// refresh only if aside
|
|
1231
|
+
|
|
1232
|
+
if (event.data.type === 'disconnect') {
|
|
1233
|
+
refresh()
|
|
1234
|
+
} else {
|
|
1235
|
+
refresh()
|
|
1236
|
+
}
|
|
1273
1237
|
}
|
|
1274
1238
|
}
|
|
1275
1239
|
} else {
|
|
@@ -66,9 +66,10 @@
|
|
|
66
66
|
padding: 20px 0;
|
|
67
67
|
}
|
|
68
68
|
.titleview h1 {
|
|
69
|
+
word-break: break-word;
|
|
69
70
|
font-size: 40px;
|
|
70
71
|
text-transform: uppercase;
|
|
71
|
-
letter-spacing:
|
|
72
|
+
letter-spacing: -1px;
|
|
72
73
|
}
|
|
73
74
|
.item > .d {
|
|
74
75
|
padding-bottom: 10px;
|
|
@@ -84,11 +85,11 @@
|
|
|
84
85
|
padding-bottom: 5px;
|
|
85
86
|
}
|
|
86
87
|
.item .explanation {
|
|
87
|
-
white-space: pre;
|
|
88
88
|
padding-top: 5px;
|
|
89
89
|
color: brown;
|
|
90
|
-
font-size:
|
|
90
|
+
font-size: 12px;
|
|
91
91
|
font-weight: bold;
|
|
92
|
+
font-family: verdana;
|
|
92
93
|
}
|
|
93
94
|
body.dark .item input[type=text] {
|
|
94
95
|
background: rgba(255,255,255,0.1);
|
|
@@ -106,6 +107,10 @@ body.dark .item select {
|
|
|
106
107
|
width: 100%;
|
|
107
108
|
}
|
|
108
109
|
.item select {
|
|
110
|
+
-webkit-appearance: none;
|
|
111
|
+
-moz-appearance: none;
|
|
112
|
+
appearance: none;
|
|
113
|
+
|
|
109
114
|
background: rgba(0,0,0,0.05);
|
|
110
115
|
padding: 10px;
|
|
111
116
|
box-sizing: border-box;
|
|
@@ -174,6 +179,18 @@ hr {
|
|
|
174
179
|
height: 1px;
|
|
175
180
|
border: none;
|
|
176
181
|
}
|
|
182
|
+
.reset-cache-loading {
|
|
183
|
+
padding: 10px;
|
|
184
|
+
background: rgba(0,0,0,0.1);
|
|
185
|
+
margin-bottom: 10px;
|
|
186
|
+
text-align: center;
|
|
187
|
+
}
|
|
188
|
+
.reset-bin-loading {
|
|
189
|
+
padding: 10px;
|
|
190
|
+
background: rgba(0,0,0,0.1);
|
|
191
|
+
margin-bottom: 10px;
|
|
192
|
+
text-align: center;
|
|
193
|
+
}
|
|
177
194
|
</style>
|
|
178
195
|
<script src="/hotkeys.min.js"></script>
|
|
179
196
|
<script src="/sweetalert2.js"></script>
|
|
@@ -318,7 +335,7 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
318
335
|
<% if (locals.bin) { %>
|
|
319
336
|
document.querySelector("#del-bin").addEventListener("click", async (e) => {
|
|
320
337
|
console.log("del-bin")
|
|
321
|
-
let
|
|
338
|
+
let proceed = confirm("Are you sure you wish to delete the bin folder?")
|
|
322
339
|
if (proceed) {
|
|
323
340
|
document.querySelector(".reset-bin-loading").classList.remove("hidden")
|
|
324
341
|
document.querySelector("#del-bin").classList.add("hidden")
|
|
@@ -342,7 +359,7 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
342
359
|
})
|
|
343
360
|
document.querySelector("#del-cache").addEventListener("click", async (e) => {
|
|
344
361
|
console.log("del-cache")
|
|
345
|
-
let
|
|
362
|
+
let proceed = confirm("Are you sure you wish to delete the cache folder?")
|
|
346
363
|
if (proceed) {
|
|
347
364
|
document.querySelector(".reset-cache-loading").classList.remove("hidden")
|
|
348
365
|
document.querySelector("#del-cache").classList.add("hidden")
|