Skip to content

Commit

Permalink
Load passwords in settings form
Browse files Browse the repository at this point in the history
  • Loading branch information
nicodh committed Feb 28, 2019
1 parent 3d8d85a commit 4925f93
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 0 additions & 4 deletions src/renderer/components/Login.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ class Login extends React.Component {

handleSubmit (event) {
let config = this.state.credentials
if (!this.state.ui.showAdvanced) {
// ignore advanced settings
config = { mailPw: config.mailPw, addr: config.addr }
}
this.props.onSubmit(config)
event.preventDefault()
}
Expand Down
8 changes: 6 additions & 2 deletions src/renderer/components/dialogs/Settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ class Settings extends React.Component {
if (this.props.isOpen && !prevProps.isOpen) {
const settings = ipcRenderer.sendSync(
'getConfigFor', [
'addr',
'mail_pw',
'inbox_watch',
'sentbox_watch',
'mvbox_watch',
Expand All @@ -63,6 +65,7 @@ class Settings extends React.Component {
'configured_mail_port',
'configured_mail_security',
'configured_send_user',
'configured_send_pw',
'configured_send_server',
'configured_send_port',
'configured_send_security',
Expand Down Expand Up @@ -159,7 +162,7 @@ class Settings extends React.Component {

render () {
const { deltachat, isOpen, onClose } = this.props
const { userDetails, advancedSettings, saved, keyTransfer } = this.state
const { userDetails, settings, advancedSettings, saved, keyTransfer } = this.state
const tx = window.translate
const title = tx('menu_settings')
return (
Expand All @@ -175,7 +178,8 @@ class Settings extends React.Component {
<Login
{...advancedSettings}
mode={'update'}
addr={deltachat.credentials.addr}
addr={settings.addr}
mailPw={settings.mail_pw}
onSubmit={this.onLoginSubmit}
loading={deltachat.configuring}
addrDisabled>
Expand Down

0 comments on commit 4925f93

Please sign in to comment.