mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 09:10:30 +08:00
connecting state for link led
This commit is contained in:
parent
159c399fb8
commit
43fa2cc2ff
@ -33,6 +33,11 @@ img.led-pak-typing {
|
||||
animation: spin 2s linear infinite;
|
||||
}
|
||||
|
||||
img.led-link-connecting {
|
||||
-webkit-filter: invert(0.5) sepia(1) saturate(5) hue-rotate(0deg);
|
||||
filter: invert(0.5) sepia(1) saturate(5) hue-rotate(0deg);
|
||||
}
|
||||
|
||||
img.led-fan-on {
|
||||
-webkit-filter: invert(0.5) sepia(1) saturate(5) hue-rotate(100deg);
|
||||
filter: invert(0.5) sepia(1) saturate(5) hue-rotate(100deg);
|
||||
|
||||
@ -20,6 +20,8 @@ var session = new function() {
|
||||
};
|
||||
|
||||
this.startPoller = function() {
|
||||
$("link-led").className = "led-link-connecting";
|
||||
$("link-led").title = "Connecting...";
|
||||
var http = tools.makeRequest("GET", "/wsauth", function() {
|
||||
if (http.readyState === 4) {
|
||||
if (http.status === 200) {
|
||||
@ -37,6 +39,7 @@ var session = new function() {
|
||||
|
||||
var __wsOpenHandler = function(event) {
|
||||
$("link-led").className = "led-on";
|
||||
$("link-led").title = "Connected";
|
||||
tools.debug("WebSocket opened:", event);
|
||||
atx.loadInitialState();
|
||||
msd.loadInitialState();
|
||||
@ -80,7 +83,10 @@ var session = new function() {
|
||||
hid.setSocket(null);
|
||||
atx.clearState();
|
||||
__ws = null;
|
||||
setTimeout(session.startPoller, 1000);
|
||||
setTimeout(function() {
|
||||
$("link-led").className = "led-link-connecting";
|
||||
setTimeout(session.startPoller, 500);
|
||||
}, 500);
|
||||
};
|
||||
|
||||
var __pingServer = function() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user