warn when changing master password

This commit is contained in:
Jonathan Lamothe 2019-01-01 21:15:09 -05:00
parent 191be38fbe
commit 7cf0b34078
2 changed files with 8 additions and 3 deletions

View File

@ -3,6 +3,7 @@
## Unreleased changes
- implemented manual saving
- added a warning when changing master password
## 0.1.1

View File

@ -94,9 +94,13 @@ viewEditMenu = menu "View/Edit Password"
changeMasterPass :: S.StateT Status IO ()
changeMasterPass = do
oldP <- S.gets $ view masterPass
newP <- req $ reqDefault getMasterPass oldP
S.modify $ set masterPass newP
req (confirm $
"\nWARNING: Changing your master password will change all of your saved passwords.\n" ++
"Are you sure you would like to proceed?") >>= flip when
(do
oldP <- S.gets $ view masterPass
newP <- req $ reqDefault getMasterPass oldP
S.modify $ set masterPass newP)
mainMenu
lockSession :: S.StateT Status IO ()