mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-31 01:51:53 +08:00
pikvm/pikvm#1462: relative root location
This commit is contained in:
@@ -52,13 +52,15 @@
|
||||
<link rel="stylesheet" href="../share/css/kvm/keyboard.css">
|
||||
<link rel="stylesheet" href="../share/css/kvm/about.css">
|
||||
<link rel="stylesheet" href="../share/css/user.css">
|
||||
<script type="module">import {main} from "../share/js/kvm/main.js";
|
||||
<script type="module">import {setRootPrefix} from "../share/js/vars.js";
|
||||
setRootPrefix("../");
|
||||
import {main} from "../share/js/kvm/main.js";
|
||||
main();
|
||||
</script>
|
||||
</head>
|
||||
<body class="body-no-select">
|
||||
<ul id="navbar">
|
||||
<li class="left"><a id="logo" href="/">← <img class="svg-gray" src="../share/svg/logo.svg" alt="&pi;-kvm"></a></li>
|
||||
<li class="left"><a id="logo" href="../">← <img class="svg-gray" src="../share/svg/logo.svg" alt="&pi;-kvm"></a></li>
|
||||
<div class="hidden" id="hw-health-dropdown">
|
||||
<li class="left"><a class="menu-button" href="#"><img class="hidden" id="hw-health-undervoltage-led" src="../share/svg/led-undervoltage.svg"><img class="hidden" id="hw-health-overheating-led" src="../share/svg/led-overheating.svg"></a>
|
||||
<div class="menu">
|
||||
@@ -131,7 +133,7 @@
|
||||
<td style="line-height:1.5"><b>Fan failed</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><sup style="line-height:1">A fan error occured, please <a href="/api/log?seek=3600&follow=1" target="_blank">check the log</a></sup></td>
|
||||
<td><sup style="line-height:1">A fan error occured, please <a href="../api/log?seek=3600&follow=1" target="_blank">check the log</a></sup></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@@ -2283,7 +2285,9 @@
|
||||
<label for="about-tab-meta-button">Meta</label>
|
||||
<div class="tab">
|
||||
<div class="code" id="about-meta">
|
||||
<div><span class="code-comment">// You can get this JSON using handle <a target="_blank" href="/api/info?fields=meta">/api/info?fields=meta</a><br>
|
||||
<div><span class="code-comment">
|
||||
// You can get this JSON using handle
|
||||
<a target="_blank" href="../api/info?fields=meta">/api/info?fields=meta</a><br>
|
||||
// In the standard configuration this data<br>
|
||||
// is specified in the file /etc/kvmd/meta.yaml</span><br>
|
||||
<pre id="kvmd-meta-json">No data</pre>
|
||||
|
||||
@@ -3,7 +3,7 @@ extends ../base.pug
|
||||
|
||||
append vars
|
||||
-
|
||||
prefix = "../"
|
||||
root_prefix = "../"
|
||||
title = "PiKVM Session"
|
||||
main_js = "kvm/main"
|
||||
body_class = "body-no-select"
|
||||
|
||||
@@ -31,4 +31,4 @@
|
||||
#fan-health-message-fail
|
||||
hr
|
||||
+menu_message("led-fan", "Fan failed", "led-gray")
|
||||
| A fan error occured, please #[a(href="/api/log?seek=3600&follow=1" target="_blank") check the log]
|
||||
| A fan error occured, please #[a(href=`${root_prefix}api/log?seek=3600&follow=1` target="_blank") check the log]
|
||||
|
||||
@@ -83,7 +83,7 @@ mixin menu_spoiler(title)
|
||||
|
||||
ul#navbar
|
||||
li.left
|
||||
a(id="logo" href="/") ←
|
||||
a(id="logo" href=root_prefix) ←
|
||||
img.svg-gray(src=`${svg_dir}/logo.svg` alt="π-kvm")
|
||||
|
||||
include navbar-health.pug
|
||||
|
||||
@@ -34,7 +34,8 @@ mixin about_tab(name, title, checked=false)
|
||||
+about_tab("meta", "Meta", true)
|
||||
div
|
||||
span.code-comment
|
||||
| // You can get this JSON using handle #[a(target="_blank" href="/api/info?fields=meta") /api/info?fields=meta]#[br]
|
||||
| // You can get this JSON using handle
|
||||
| #[a(target="_blank" href=`${root_prefix}api/info?fields=meta`) /api/info?fields=meta]#[br]
|
||||
| // In the standard configuration this data#[br]
|
||||
| // is specified in the file /etc/kvmd/meta.yaml
|
||||
br
|
||||
|
||||
Reference in New Issue
Block a user