mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 09:10:30 +08:00
refactoring
This commit is contained in:
parent
45bdfd111d
commit
1c4a6b0deb
@ -53,6 +53,7 @@ ul#ctl p {
|
|||||||
ul#ctl img {
|
ul#ctl img {
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 11px 11px;
|
padding: 11px 11px;
|
||||||
|
height: 24px;
|
||||||
}
|
}
|
||||||
ul#ctl a.ctl-item {
|
ul#ctl a.ctl-item {
|
||||||
display: block;
|
display: block;
|
||||||
@ -89,9 +90,10 @@ div.ctl-dropdown-content button {
|
|||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
white-space:nowrap;
|
white-space:nowrap;
|
||||||
height: 30px!important;
|
height: 30px;
|
||||||
font-size: 16px!important;
|
font-size: 16px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
div.ctl-dropdown-content button:last-child {
|
div.ctl-dropdown-content button:last-child {
|
||||||
border-radius: 0 0 8px 8px;
|
border-radius: 0 0 8px 8px;
|
||||||
@ -102,6 +104,7 @@ div.ctl-dropdown-content button:enabled:hover {
|
|||||||
}
|
}
|
||||||
div.ctl-dropdown-content button:disabled {
|
div.ctl-dropdown-content button:disabled {
|
||||||
color: #36393f;
|
color: #36393f;
|
||||||
|
cursor: wait;
|
||||||
}
|
}
|
||||||
div.ctl-dropdown-content hr {
|
div.ctl-dropdown-content hr {
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
@ -126,6 +129,7 @@ img#stream-image {
|
|||||||
height: 480px;
|
height: 480px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
border: 1px solid #17191d;
|
border: 1px solid #17191d;
|
||||||
|
background-color: black;
|
||||||
}
|
}
|
||||||
img.stream-image-active {
|
img.stream-image-active {
|
||||||
cursor: crosshair;
|
cursor: crosshair;
|
||||||
@ -144,7 +148,6 @@ img#msd-led,
|
|||||||
img#atx-hdd-led,
|
img#atx-hdd-led,
|
||||||
img#stream-led,
|
img#stream-led,
|
||||||
img#hid-keyboard-led {
|
img#hid-keyboard-led {
|
||||||
height: 24px;
|
|
||||||
}
|
}
|
||||||
img.led-on {
|
img.led-on {
|
||||||
-webkit-filter: invert(0.5) sepia(1) saturate(5) hue-rotate(100deg);
|
-webkit-filter: invert(0.5) sepia(1) saturate(5) hue-rotate(100deg);
|
||||||
|
|||||||
@ -68,7 +68,7 @@ var atx = new function() {
|
|||||||
"atx-power-button-long",
|
"atx-power-button-long",
|
||||||
"atx-reset-button",
|
"atx-reset-button",
|
||||||
].forEach(function(name) {
|
].forEach(function(name) {
|
||||||
tools.setButtonBusy(document.getElementById(name), busy);
|
document.getElementById(name).disabled = busy;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@ -28,13 +28,13 @@ var stream = new function() {
|
|||||||
// };
|
// };
|
||||||
|
|
||||||
this.clickResetButton = function(el_button) {
|
this.clickResetButton = function(el_button) {
|
||||||
tools.setButtonBusy(el_button, true);
|
el_button.disabled = true;
|
||||||
var http = tools.makeRequest("POST", "/kvmd/streamer/reset", function() {
|
var http = tools.makeRequest("POST", "/kvmd/streamer/reset", function() {
|
||||||
if (http.readyState === 4) {
|
if (http.readyState === 4) {
|
||||||
if (http.status !== 200) {
|
if (http.status !== 200) {
|
||||||
alert("Can't reset stream:", http.responseText);
|
alert("Can't reset stream:", http.responseText);
|
||||||
}
|
}
|
||||||
tools.setButtonBusy(el_button, false);
|
el_button.disabled = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@ -8,11 +8,6 @@ var tools = new function() {
|
|||||||
return http;
|
return http;
|
||||||
};
|
};
|
||||||
|
|
||||||
this.setButtonBusy = function(el_button, busy) {
|
|
||||||
el_button.disabled = busy;
|
|
||||||
el_button.style.cursor = (busy ? "wait" : "default");
|
|
||||||
};
|
|
||||||
|
|
||||||
var __debug = (new URL(window.location.href)).searchParams.get("debug");
|
var __debug = (new URL(window.location.href)).searchParams.get("debug");
|
||||||
|
|
||||||
this.debug = function(...args) {
|
this.debug = function(...args) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user