render the master password form

This commit is contained in:
2024-09-07 18:30:25 -04:00
parent 2b427789d2
commit ffce0d6a1c
3 changed files with 51 additions and 8 deletions

View File

@@ -28,29 +28,25 @@ import Brick
( App (..)
, BrickEvent
, EventM
, Widget
, attrMap
, emptyWidget
, halt
, neverShowCursor
, showFirstCursor
, style
)
import Password.App.Draw
import Password.App.Types
-- | The main application
passmanApp :: App AppState () ResName
passmanApp = App
{ appDraw = drawFunc
, appChooseCursor = neverShowCursor
, appChooseCursor = showFirstCursor
, appHandleEvent = eventHandler
, appStartEvent = return ()
, appAttrMap = const $ attrMap (style 0) []
}
drawFunc :: AppState -> [Widget ResName]
drawFunc = const [emptyWidget]
eventHandler :: BrickEvent ResName () -> EventM ResName AppState ()
eventHandler = const halt