fix: choice box for generate new password was ignored

This commit is contained in:
Adrien Waksberg 2021-01-02 17:42:04 +01:00
parent 302ac2abe2
commit 48326bf95b
2 changed files with 6 additions and 1 deletions

View file

@ -7,6 +7,10 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/)
## Unreleased ## Unreleased
### Fixed
- Choice box for generate new password was ignored
## v2.0.0 - 2020-12-23 ## v2.0.0 - 2020-12-23
### Changed ### Changed

View file

@ -291,8 +291,9 @@ func (c *Cli) UpdateEntry(entry Entry) bool {
if c.ChoiceBox("Generate a new random password ?", false) { if c.ChoiceBox("Generate a new random password ?", false) {
entry.Password = RandomString(c.Config.PasswordLength, entry.Password = RandomString(c.Config.PasswordLength,
c.Config.PasswordLetter, c.Config.PasswordDigit, c.Config.PasswordSpecial) c.Config.PasswordLetter, c.Config.PasswordDigit, c.Config.PasswordSpecial)
} } else {
entry.Password = c.InputBox("Password", "", true) entry.Password = c.InputBox("Password", "", true)
}
entry.OTP = c.InputBox("OTP Key", entry.OTP, false) entry.OTP = c.InputBox("OTP Key", entry.OTP, false)
entry.Comment = c.InputBox("Comment", entry.Comment, false) entry.Comment = c.InputBox("Comment", entry.Comment, false)