diff --git a/src/Zenith/CLI.hs b/src/Zenith/CLI.hs index b46d04b..517e7d0 100644 --- a/src/Zenith/CLI.hs +++ b/src/Zenith/CLI.hs @@ -214,7 +214,9 @@ drawUI s = [splashDialog s, helpDialog s, displayDialog s, inputDialog s, ui s] , capCommand "A" "ccounts" , capCommand "V" "iew address" , capCommand "S" "end Tx" + , capCommand2 "Address " "B" "ook" , capCommand "Q" "uit" + , capCommand "?" " Help" , str $ show (st ^. timer) ]) listBox :: Show e => String -> L.List Name e -> Widget Name @@ -281,7 +283,7 @@ drawUI s = [splashDialog s, helpDialog s, displayDialog s, inputDialog s, ui s] vBox ([str "Actions", B.hBorder] <> actionList)) else emptyWidget where - keyList = map (C.hCenter . str) ["?", "Esc", "w", "a", "v", "q"] + keyList = map (C.hCenter . str) ["?", "Esc", "w", "a", "v", "s", "b", "q"] actionList = map (hLimit 40 . str) @@ -290,6 +292,8 @@ drawUI s = [splashDialog s, helpDialog s, displayDialog s, inputDialog s, ui s] , "Switch wallets" , "Switch accounts" , "View address" + , "Send Tx" + , "Address Book" , "Quit" ] inputDialog :: State -> Widget Name @@ -351,6 +355,13 @@ drawUI s = [splashDialog s, helpDialog s, displayDialog s, inputDialog s, ui s] (withAttr titleAttr (str "Zcash Wallet v0.5.2.0-beta")) <=> C.hCenter (withAttr blinkAttr $ str "Press any key...")) else emptyWidget + + capCommand3 :: String -> String -> String -> Widget Name + capCommand3 l h e = hBox [str l, withAttr titleAttr (str h), str e] + + capCommand2 :: String -> String -> String -> Widget Name + capCommand2 l h e = hBox [str l, withAttr titleAttr (str h), str e, str " | "] + capCommand :: String -> String -> Widget Name capCommand k comm = hBox [withAttr titleAttr (str k), str comm, str " | "] xCommand :: Widget Name @@ -943,6 +954,8 @@ appEvent (BT.VtyEvent e) = do set txForm $ mkSendForm (s ^. balance) (SendInput "" 0.0 "") BT.modify $ set dialogBox SendTx + V.EvKey (V.KChar 'b') [] -> + BT.modify $ set dialogBox ASelect ev -> case r of Just AList ->