instead of instantly defaulting to novnc when the chosen
default is not available, try the other (better variant)
before falling back to novnc
e.g. having no default set is equivalent to having it set
to xtermjs, and having a vm with spice then previously
defaulted to novnc, now to spice (the reverse is also true)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
allowXtermjs = !!consoles.xtermjs;
}
var dv = PVE.VersionInfo.console || 'xtermjs';
- if ((dv === 'vv' && !allowSpice) || (dv === 'xtermjs' && !allowXtermjs)) {
- dv = 'html5';
+ if (dv === 'vv' && !allowSpice) {
+ dv = (allowXtermjs) ? 'xtermjs' : 'html5';
+ } else if (dv === 'xtermjs' && !allowXtermjs) {
+ dv = (allowSpice) ? 'vv' : 'html5';
}
return dv;