From f1503d69e0b15caa5d8fd0f4fb30b91d516db2ea Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Tue, 5 Nov 2024 18:17:00 +0200 Subject: [PATCH] pikvm/pikvm#1207: Draw UI tips via meta.yaml --- web/kvm/index.html | 19 ++++++++++++++++--- web/kvm/index.pug | 10 ++++++++-- web/kvm/window-about.pug | 9 +++++++++ web/login/index.html | 2 +- web/login/index.pug | 2 +- web/share/css/main.css | 4 ++-- web/share/css/navbar.css | 30 ++++++++++++++++++++++++++++++ web/share/js/kvm/session.js | 18 +++++++++--------- 8 files changed, 76 insertions(+), 18 deletions(-) diff --git a/web/kvm/index.html b/web/kvm/index.html index 960535f2..0c40cc83 100644 --- a/web/kvm/index.html +++ b/web/kvm/index.html @@ -1999,7 +1999,12 @@
-
No data +
+
// You can get this JSON using handle /api/info?fields=meta
+ // In the standard configuration this data
+ // is specified in the file /etc/kvmd/meta.yaml

+
No data
+
@@ -2673,9 +2678,17 @@
+ \ No newline at end of file diff --git a/web/kvm/index.pug b/web/kvm/index.pug index a6c53f70..ef694dde 100644 --- a/web/kvm/index.pug +++ b/web/kvm/index.pug @@ -11,14 +11,20 @@ block body include navbar.pug include windows.pug + ul(class="navbar-bg-tips") + li(class="left") + pre(id="kvmd-meta-tips-left") + li(class="right") + pre(id="kvmd-meta-tips-right") + ul(class="footer") - li(class="footer-left") + li(class="left") span(id="kvmd-meta-server-host" title="Server name (see System/About)") |   |   span(id="kvmd-version-kvmd" title="KVMD version") |   |   span(id="kvmd-version-streamer" title="Streamer version") - li(class="footer-right") + li(class="right") a(target="_blank" href="https://pikvm.org") PiKVM Project |   |   a(target="_blank" href="https://docs.pikvm.org") Documentation diff --git a/web/kvm/window-about.pug b/web/kvm/window-about.pug index 42503c6c..a9c50aac 100644 --- a/web/kvm/window-about.pug +++ b/web/kvm/window-about.pug @@ -29,6 +29,15 @@ div(id="about-window" class="window") br div(class="tabs-box") +about_tab("meta", "Meta", true) + div + span(class="code-comment") + | // You can get this JSON using handle #[a(target="_blank" href="/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 + pre(id="kvmd-meta-json") + | No data + +about_tab("hardware", "Hardware") +about_tab("version", "Version") diff --git a/web/login/index.html b/web/login/index.html index 26b07640..99fa2aed 100644 --- a/web/login/index.html +++ b/web/login/index.html @@ -82,7 +82,7 @@