|
@@ -96,6 +96,7 @@ var UI;
|
|
UI.initSetting('view_only', false);
|
|
UI.initSetting('view_only', false);
|
|
UI.initSetting('path', 'websockify');
|
|
UI.initSetting('path', 'websockify');
|
|
UI.initSetting('repeaterID', '');
|
|
UI.initSetting('repeaterID', '');
|
|
|
|
+ UI.initSetting('token', '');
|
|
|
|
|
|
var autoconnect = WebUtil.getConfigVar('autoconnect', false);
|
|
var autoconnect = WebUtil.getConfigVar('autoconnect', false);
|
|
if (autoconnect === 'true' || autoconnect == '1') {
|
|
if (autoconnect === 'true' || autoconnect == '1') {
|
|
@@ -519,6 +520,7 @@ var UI;
|
|
UI.connSettingsOpen = false;
|
|
UI.connSettingsOpen = false;
|
|
UI.saveSetting('host');
|
|
UI.saveSetting('host');
|
|
UI.saveSetting('port');
|
|
UI.saveSetting('port');
|
|
|
|
+ UI.saveSetting('token');
|
|
//UI.saveSetting('password');
|
|
//UI.saveSetting('password');
|
|
} else {
|
|
} else {
|
|
$D('noVNC_controls').style.display = "block";
|
|
$D('noVNC_controls').style.display = "block";
|
|
@@ -810,7 +812,14 @@ var UI;
|
|
var host = $D('noVNC_host').value;
|
|
var host = $D('noVNC_host').value;
|
|
var port = $D('noVNC_port').value;
|
|
var port = $D('noVNC_port').value;
|
|
var password = $D('noVNC_password').value;
|
|
var password = $D('noVNC_password').value;
|
|
|
|
+ var token = $D('noVNC_token').value;
|
|
var path = $D('noVNC_path').value;
|
|
var path = $D('noVNC_path').value;
|
|
|
|
+
|
|
|
|
+ //if token is in path then ignore the new token variable
|
|
|
|
+ if (token) {
|
|
|
|
+ path = WebUtil.injectParamIfMissing(path, "token", token);
|
|
|
|
+ }
|
|
|
|
+
|
|
if ((!host) || (!port)) {
|
|
if ((!host) || (!port)) {
|
|
throw new Error("Must set host and port");
|
|
throw new Error("Must set host and port");
|
|
}
|
|
}
|