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 ## Unreleased changes
- implemented manual saving - implemented manual saving
- added a warning when changing master password
## 0.1.1 ## 0.1.1

View File

@ -94,9 +94,13 @@ viewEditMenu = menu "View/Edit Password"
changeMasterPass :: S.StateT Status IO () changeMasterPass :: S.StateT Status IO ()
changeMasterPass = do changeMasterPass = do
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 oldP <- S.gets $ view masterPass
newP <- req $ reqDefault getMasterPass oldP newP <- req $ reqDefault getMasterPass oldP
S.modify $ set masterPass newP S.modify $ set masterPass newP)
mainMenu mainMenu
lockSession :: S.StateT Status IO () lockSession :: S.StateT Status IO ()