Simplify logic for status hierarchy
Removes unnecessary variable
This commit is contained in:
parent
afa1f8a2ab
commit
b17f6c6929
15
app/ui.js
15
app/ui.js
|
@ -453,19 +453,14 @@ const UI = {
|
||||||
|
|
||||||
// Don't overwrite more severe visible statuses and never
|
// Don't overwrite more severe visible statuses and never
|
||||||
// errors. Only shows the first error.
|
// errors. Only shows the first error.
|
||||||
let visible_status_type = 'none';
|
|
||||||
if (statusElem.classList.contains("noVNC_open")) {
|
if (statusElem.classList.contains("noVNC_open")) {
|
||||||
if (statusElem.classList.contains("noVNC_status_error")) {
|
if (statusElem.classList.contains("noVNC_status_error")) {
|
||||||
visible_status_type = 'error';
|
return;
|
||||||
} else if (statusElem.classList.contains("noVNC_status_warn")) {
|
}
|
||||||
visible_status_type = 'warn';
|
if (statusElem.classList.contains("noVNC_status_warn") &&
|
||||||
} else {
|
status_type === 'normal') {
|
||||||
visible_status_type = 'normal';
|
return;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (visible_status_type === 'error' ||
|
|
||||||
(visible_status_type === 'warn' && status_type === 'normal')) {
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
clearTimeout(UI.statusTimeout);
|
clearTimeout(UI.statusTimeout);
|
||||||
|
|
Loading…
Reference in New Issue