pinokiod 1.2.56 → 1.2.58
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 +3 -0
- package/server/public/opener.js +1 -1
package/package.json
CHANGED
package/server/index.js
CHANGED
|
@@ -1855,6 +1855,9 @@ class Server {
|
|
|
1855
1855
|
// if there is no menu, display all files
|
|
1856
1856
|
let p = this.kernel.path("api", name)
|
|
1857
1857
|
let files = await fs.promises.readdir(p, { withFileTypes: true })
|
|
1858
|
+
files = files.filter((file) => {
|
|
1859
|
+
return file.name.endsWith(".json") || file.name.endsWith(".js")
|
|
1860
|
+
})
|
|
1858
1861
|
config = {
|
|
1859
1862
|
title: name,
|
|
1860
1863
|
menu: files.map((file) => {
|
package/server/public/opener.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
document.addEventListener("click", async (e) => {
|
|
2
2
|
// [data-filepath] should open in file explorer
|
|
3
|
-
let el = e.target.closest("data-filepath")
|
|
3
|
+
let el = e.target.closest("[data-filepath]")
|
|
4
4
|
if (!el) {
|
|
5
5
|
let filepath = e.target.getAttribute("data-filepath")
|
|
6
6
|
if (filepath) {
|