From d060125cd3a146b9817aec4cbc8705da91cf5139 Mon Sep 17 00:00:00 2001 From: Devaev Maxim Date: Sat, 24 Nov 2018 04:55:33 +0300 Subject: using div.code instead of custom textarea --- web/css/kvm/about.css | 33 +-------------------------------- web/js/kvm/session.js | 16 +++++++++------- web/kvm/index.html | 4 +++- 3 files changed, 13 insertions(+), 40 deletions(-) diff --git a/web/css/kvm/about.css b/web/css/kvm/about.css index c049dd59..e6e2360f 100644 --- a/web/css/kvm/about.css +++ b/web/css/kvm/about.css @@ -23,37 +23,6 @@ div#about tr.version { font-family: monospace; } - -div#about textarea { - display: block; - resize: none; - width: 100%; +div#about div#about-meta { height: 200px; - padding: 0; - color: var(--cs-code-default-fg); - background-color: var(--cs-code-default-bg); - border: none; - border-radius: 4px; - outline: 0 !important; - box-sizing: border-box; - padding: 5px; - font-family: monospace; - -webkit-appearance:none; -} - -div#about textarea::-moz-placeholder { - line-height: 190px; - text-align: center; -} -div#about textarea::-webkit-input-placeholder { - line-height: 190px; - text-align: center; -} - -div#about textarea::-webkit-scrollbar { - width: 8px; -} -div#about textarea::-webkit-scrollbar-thumb { - border-radius: 4px; - background: var(--cs-scroll-default-bg); } diff --git a/web/js/kvm/session.js b/web/js/kvm/session.js index ebddff7b..04149be3 100644 --- a/web/js/kvm/session.js +++ b/web/js/kvm/session.js @@ -27,13 +27,15 @@ function Session() { if (http.status === 200) { var info = JSON.parse(http.responseText).result; if (info.meta) { - $("about-meta").innerHTML = ( - "// Pi-KVM metadata.\n" - + "// You can get this json using handle /kvmd/info.\n" - + "// In the standard configuration this data\n" - + "// is specified in the file /etc/kvmd/meta.yaml.\n\n" - + JSON.stringify(info.meta, undefined, 4) - ); + var text = JSON.stringify(info.meta, undefined, 4).replace(/ /g, " ").replace(/\n/g, "
"); + $("about-meta").innerHTML = ` + // The Pi-KVM metadata.
+ // You can get this json using handle /kvmd/info.
+ // In the standard configuration this data
+ // is specified in the file /etc/kvmd/meta.yaml.

+
+ ${text} + `; if (info.meta.server && info.meta.server.host) { document.title = "Pi-KVM Session - " + info.meta.server.host; $("kvmd-meta-server-host").innerHTML = "Server: " + info.meta.server.host; diff --git a/web/kvm/index.html b/web/kvm/index.html index e67654a6..0e84e52f 100644 --- a/web/kvm/index.html +++ b/web/kvm/index.html @@ -573,7 +573,9 @@
- +
+ No data +

Full documentation, source code, hardware schematics and legal information -- cgit v1.2.3