summaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2021-04-21 01:47:14 +0300
committerDevaev Maxim <[email protected]>2021-04-21 01:47:14 +0300
commit9adc6bc6df903977580f89a0d17d44f424179292 (patch)
tree5ec2e45719bf1572cfc03c25ad0221bd100174fb /web
parent81490428a5cba7eb22450296c89b4cc9bdf81253 (diff)
simplified
Diffstat (limited to 'web')
-rw-r--r--web/share/css/kvm/stream.css14
-rw-r--r--web/share/js/kvm/stream.js10
2 files changed, 5 insertions, 19 deletions
diff --git a/web/share/css/kvm/stream.css b/web/share/css/kvm/stream.css
index cd202eea..1bbfb2d4 100644
--- a/web/share/css/kvm/stream.css
+++ b/web/share/css/kvm/stream.css
@@ -37,6 +37,10 @@ div#stream-box {
display: inline-block;
border: var(--border-window-thin);
}
+div.stream-box-inactive {
+ -webkit-filter: grayscale(100%) brightness(75%) sepia(75%);
+ filter: grayscale(100%) brightness(75%) sepia(75%);
+}
div.stream-box-inactive::after {
cursor: wait;
content: "";
@@ -60,16 +64,6 @@ img#stream-image {
background-color: black;
}
-img.stream-image-active {
- -webkit-filter: none;
- filter: none;
-}
-
-img.stream-image-inactive {
- -webkit-filter: grayscale(100%) brightness(75%) sepia(75%);
- filter: grayscale(100%) brightness(75%) sepia(75%);
-}
-
div#stream-mouse-buttons {
display: none;
}
diff --git a/web/share/js/kvm/stream.js b/web/share/js/kvm/stream.js
index 1414bda4..72c2247b 100644
--- a/web/share/js/kvm/stream.js
+++ b/web/share/js/kvm/stream.js
@@ -67,7 +67,6 @@ export function Streamer() {
if (!wm.isWindowVisible($("stream-window"))) {
if (__state_for_invisible === null) {
$("stream-image").src = "/share/png/blank-stream.png";
- $("stream-image").className = "stream-image-inactive";
$("stream-box").classList.add("stream-box-inactive");
}
__state_for_invisible = state;
@@ -183,14 +182,7 @@ export function Streamer() {
};
var __updateStreamWindow = function(is_active, online) {
- if (online) {
- $("stream-image").className = "stream-image-active";
- $("stream-box").classList.remove("stream-box-inactive");
- } else {
- $("stream-image").className = "stream-image-inactive";
- $("stream-box").classList.add("stream-box-inactive");
- }
-
+ $("stream-box").classList.toggle("stream-box-inactive", !online);
let el_grab = document.querySelector("#stream-window-header .window-grab");
let el_info = $("stream-info");
if (is_active) {