diff --git a/web-server/components/SmbAuthentication.tsx b/web-server/components/SmbAuthentication.tsx index effe6f0af..c730daf36 100644 --- a/web-server/components/SmbAuthentication.tsx +++ b/web-server/components/SmbAuthentication.tsx @@ -200,8 +200,9 @@ export default class SmbAuthentication extends React.Component { */ handleKeyDown = (e) => { if (e.key === 'Enter') { + let last_key = e.key; this.props.callBack(this.state.hostname, this.b64EncodeUnicode(this.state.username), - this.b64EncodeUnicode(this.state.password), this.state.share, this.state.session_exists); + this.b64EncodeUnicode(this.state.password), this.state.share, this.state.session_exists, last_key); } } diff --git a/web-server/plugins/slycat-parameter-image/js/wizard-ui.js b/web-server/plugins/slycat-parameter-image/js/wizard-ui.js index 3fc83558d..d43d38afc 100644 --- a/web-server/plugins/slycat-parameter-image/js/wizard-ui.js +++ b/web-server/plugins/slycat-parameter-image/js/wizard-ui.js @@ -201,12 +201,16 @@ function constructor(params) console.log("onReauth"); }; - const setSmbAuthValues = function(hostname, username, password, share, session_exists) { + const setSmbAuthValues = function(hostname, username, password, share, session_exists, last_key) { component.remote.hostname(hostname) component.remote.username(username) component.remote.password(password) component.remote.share(share) component.remote.session_exists(session_exists) + //If the user hits enter key, try to connect + if(last_key === 'Enter') { + component.connectSMB(); + } } component.select_type = function() {