No browser save of wifi config password

fixes #32
This commit is contained in:
Robin Davies
2022-03-12 16:02:35 -05:00
parent 8f10596863
commit cd56f7f71a
2 changed files with 7 additions and 3 deletions
+1
View File
@@ -90,6 +90,7 @@ class NoChangePassword extends React.Component<NoChangePasswordProps, NoChangePa
{ {
e.target.value = "(Unchanged)"; e.target.value = "(Unchanged)";
} }
e.currentTarget.setAttribute("readonly","true");
} }
render() { render() {
+6 -3
View File
@@ -207,9 +207,10 @@ const WifiConfigDialog = withStyles(styles, { withTheme: true })(
} else { } else {
wifiConfigSettings.wifiWarningGiven = true; wifiConfigSettings.wifiWarningGiven = true;
this.preventPasswordPrompt(); this.preventPasswordPrompt();
// let preventPasswordPrompt changes settle (it's HARD to prevent a password prompt)
setTimeout(()=> { setTimeout(()=> {
this.props.onOk(wifiConfigSettings); this.props.onOk(wifiConfigSettings);
}); },100);
} }
} }
@@ -219,9 +220,10 @@ const WifiConfigDialog = withStyles(styles, { withTheme: true })(
let passwordInput = this.refPassword.current; let passwordInput = this.refPassword.current;
if (passwordInput) if (passwordInput)
{ {
passwordInput.value = "";
passwordInput.type = "text"; passwordInput.type = "text";
passwordInput.value = "";
} }
this.setState({newPassword: ""});
} }
handleChannelChange(e: any) handleChannelChange(e: any)
{ {
@@ -247,9 +249,10 @@ const WifiConfigDialog = withStyles(styles, { withTheme: true })(
const handleClose = () => { const handleClose = () => {
this.preventPasswordPrompt(); this.preventPasswordPrompt();
// let preventPasswordPrompt changes settle (it's HARD to prevent a password prompt)
setTimeout(()=> { setTimeout(()=> {
onClose(); onClose();
}); },100);
}; };
return ( return (