warn when changing master password
This commit is contained in:
parent
191be38fbe
commit
7cf0b34078
|
@ -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
|
||||||
|
|
||||||
|
|
10
app/UI.hs
10
app/UI.hs
|
@ -94,9 +94,13 @@ viewEditMenu = menu "View/Edit Password"
|
||||||
|
|
||||||
changeMasterPass :: S.StateT Status IO ()
|
changeMasterPass :: S.StateT Status IO ()
|
||||||
changeMasterPass = do
|
changeMasterPass = do
|
||||||
oldP <- S.gets $ view masterPass
|
req (confirm $
|
||||||
newP <- req $ reqDefault getMasterPass oldP
|
"\nWARNING: Changing your master password will change all of your saved passwords.\n" ++
|
||||||
S.modify $ set masterPass newP
|
"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
|
mainMenu
|
||||||
|
|
||||||
lockSession :: S.StateT Status IO ()
|
lockSession :: S.StateT Status IO ()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user