diff options
author | Maxim Devaev <[email protected]> | 2021-07-29 02:11:44 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2021-07-29 02:11:44 +0300 |
commit | 02335734ceafa25c660110e1f8059ff60bcb6d84 (patch) | |
tree | 69e07e3031ae365fb2a509554f8a411a5d44d607 /web/share/js/kvm/session.js | |
parent | 33c34bd4efbb675ec0c700454c655575cffe26e9 (diff) |
refactoring
Diffstat (limited to 'web/share/js/kvm/session.js')
-rw-r--r-- | web/share/js/kvm/session.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/web/share/js/kvm/session.js b/web/share/js/kvm/session.js index 12eb46fd..af328f56 100644 --- a/web/share/js/kvm/session.js +++ b/web/share/js/kvm/session.js @@ -97,11 +97,11 @@ export function Session() { let undervoltage = (flags.undervoltage.now || flags.undervoltage.past); let freq_capped = (flags.freq_capped.now || flags.freq_capped.past); - tools.hiddenSetVisible($("hw-health-dropdown"), (undervoltage || freq_capped)); + tools.hidden.setVisible($("hw-health-dropdown"), (undervoltage || freq_capped)); $("hw-health-undervoltage-led").className = (undervoltage ? (flags.undervoltage.now ? "led-red" : "led-yellow") : "hidden"); $("hw-health-overheating-led").className = (freq_capped ? (flags.freq_capped.now ? "led-red" : "led-yellow") : "hidden"); - tools.hiddenSetVisible($("hw-health-message-undervoltage"), undervoltage); - tools.hiddenSetVisible($("hw-health-message-overheating"), freq_capped); + tools.hidden.setVisible($("hw-health-message-undervoltage"), undervoltage); + tools.hidden.setVisible($("hw-health-message-overheating"), freq_capped); } }; @@ -120,7 +120,7 @@ export function Session() { $("webterm-iframe").src = ""; }; } - tools.featureSetEnabled($("webterm"), has_webterm); + tools.feature.setEnabled($("webterm"), has_webterm); $("webterm-window").show_hook = show_hook; $("webterm-window").close_hook = close_hook; @@ -206,7 +206,7 @@ export function Session() { let http = tools.makeRequest("GET", "/api/auth/check", function() { if (http.readyState === 4) { if (http.status === 200) { - __ws = new WebSocket(`${tools.https ? "wss" : "ws"}://${location.host}/api/ws`); + __ws = new WebSocket(`${tools.is_https ? "wss" : "ws"}://${location.host}/api/ws`); __ws.onopen = __wsOpenHandler; __ws.onmessage = __wsMessageHandler; __ws.onerror = __wsErrorHandler; |