pinokiod 0.1.53 → 0.1.54

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "0.1.53",
3
+ "version": "0.1.54",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/server/index.js CHANGED
@@ -40,6 +40,7 @@ class Server {
40
40
  pinokiod: packagejson.version,
41
41
  pinokio: config.version
42
42
  }
43
+ this.kernel.version = this.version
43
44
  this.upload = multer();
44
45
 
45
46
  // sometimes the C:\Windows\System32 is not in PATH, need to add
@@ -260,6 +261,7 @@ class Server {
260
261
  let stat = await fs.promises.stat(filepath)
261
262
  if (pathComponents.length === 0 && req.query.mode === "explore") {
262
263
  res.render("explore", {
264
+ version: this.version,
263
265
  logo: this.logo,
264
266
  theme: this.theme,
265
267
  agent: this.agent,
@@ -471,6 +471,13 @@ const renderSelection = (e, force) => {
471
471
 
472
472
  // if the iframe already exists, do not
473
473
  if (loaded[target.target]){
474
+
475
+ let mode = target.getAttribute("data-mode")
476
+ if (mode === "refresh") {
477
+ targetFrame.src = target.href
478
+ return
479
+ }
480
+
474
481
  if (e) {
475
482
  // triggered with a click
476
483
  // do not reload iframe if the href and the src is the same
@@ -10,7 +10,7 @@
10
10
  </div>
11
11
  <% } else { %>
12
12
  <% if (item.btn) { %>
13
- <a data-index="<%=index%>" target="<%=item.src%>" href="<%=item.href%>" class='btn header-item frame-link'>
13
+ <a data-index="<%=index%>" target="<%=item.src%>" data-mode="<%=item.mode%>" href="<%=item.href%>" class='btn header-item frame-link'>
14
14
  <div class='tab'><%-item.btn%></div>
15
15
  <% if (item.running) { %>
16
16
  <div class='loader'>