added edit password menu
This commit is contained in:
parent
aad435f366
commit
0f6cbc0b24
18
app/UI.hs
18
app/UI.hs
|
@ -96,7 +96,7 @@ searchServ = do
|
||||||
[] -> do
|
[] -> do
|
||||||
lift $ putStrLn "\nservice not found"
|
lift $ putStrLn "\nservice not found"
|
||||||
mainMenu
|
mainMenu
|
||||||
[x] -> viewEditServ x
|
[x] -> servMenu x
|
||||||
xs -> selectServ xs
|
xs -> selectServ xs
|
||||||
|
|
||||||
listServ :: S.StateT Status IO ()
|
listServ :: S.StateT Status IO ()
|
||||||
|
@ -104,13 +104,19 @@ listServ = S.gets (view database) >>= selectServ . pwSearch ""
|
||||||
|
|
||||||
selectServ :: [String] -> S.StateT Status IO ()
|
selectServ :: [String] -> S.StateT Status IO ()
|
||||||
selectServ xs = menu "Select Service" $
|
selectServ xs = menu "Select Service" $
|
||||||
map (\x -> (x, viewEditServ x)) xs ++
|
map (\x -> (x, servMenu x)) xs ++
|
||||||
[("(cancel)", mainMenu)]
|
[("(cancel)", mainMenu)]
|
||||||
|
|
||||||
viewEditServ :: String -> S.StateT Status IO ()
|
servMenu :: String -> S.StateT Status IO ()
|
||||||
viewEditServ x = menu x
|
servMenu x = menu x
|
||||||
[ ( "show password", showPass x >> viewEditServ x )
|
[ ( "show password", showPass x >> servMenu x )
|
||||||
, ( "cancel", mainMenu )
|
, ( "edit password", editPassMenu x )
|
||||||
|
, ( "cancel", mainMenu )
|
||||||
|
]
|
||||||
|
|
||||||
|
editPassMenu :: String -> S.StateT Status IO ()
|
||||||
|
editPassMenu x = menu (x ++ " : Edit Password")
|
||||||
|
[ ( "cancel", servMenu x )
|
||||||
]
|
]
|
||||||
|
|
||||||
changeMasterPass :: S.StateT Status IO ()
|
changeMasterPass :: S.StateT Status IO ()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user