Milestone 3: RPC server, ZIP-320 #104
1 changed files with 7 additions and 3 deletions
|
@ -814,7 +814,7 @@ buildUI wenv model = widgetTree
|
||||||
abookRow :: Int -> Entity AddressBook -> WidgetNode AppModel AppEvent
|
abookRow :: Int -> Entity AddressBook -> WidgetNode AppModel AppEvent
|
||||||
abookRow idx ab =
|
abookRow idx ab =
|
||||||
box_
|
box_
|
||||||
[onClick $ ShowTx idx, alignLeft]
|
[onClick $ ShowMessage (addressBookAbaddress $ entityVal ab), alignLeft]
|
||||||
(hstack
|
(hstack
|
||||||
[
|
[
|
||||||
label
|
label
|
||||||
|
@ -865,7 +865,7 @@ buildUI wenv model = widgetTree
|
||||||
, button "Cancel" CloseNewAdrBook `nodeEnabled` True
|
, button "Cancel" CloseNewAdrBook `nodeEnabled` True
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
msgAdrBookOverlay=
|
msgAdrBookOverlay =
|
||||||
alert CloseMsgAB $
|
alert CloseMsgAB $
|
||||||
hstack
|
hstack
|
||||||
[ filler
|
[ filler
|
||||||
|
@ -873,7 +873,7 @@ buildUI wenv model = widgetTree
|
||||||
[textSize 32, textColor btnColor] `nodeVisible`
|
[textSize 32, textColor btnColor] `nodeVisible`
|
||||||
(model ^. inError)
|
(model ^. inError)
|
||||||
, spacer
|
, spacer
|
||||||
, label $ fromMaybe "" (model ^. msgAB)
|
, label_ (txtWrapN (fromMaybe "" (model ^. msgAB)) 64) [multiline]
|
||||||
, filler
|
, filler
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -1200,6 +1200,7 @@ handleEvent wenv node model evt =
|
||||||
[Model $ model & newAdrBkEntry .~ False]
|
[Model $ model & newAdrBkEntry .~ False]
|
||||||
SaveNewABEntry ->
|
SaveNewABEntry ->
|
||||||
[ Task $ saveAddrBook (model ^. configuration) (ZcashNetDB (model ^. network)) (model ^. abdescrip) (model ^. abaddress)
|
[ Task $ saveAddrBook (model ^. configuration) (ZcashNetDB (model ^. network)) (model ^. abdescrip) (model ^. abaddress)
|
||||||
|
, Model $ model & abdescrip .~ "" & abaddress .~ "" & newAdrBkEntry .~ False
|
||||||
]
|
]
|
||||||
NotImplemented -> [Model $ model & msgAB ?~ "Function not implemented..." & menuPopup .~ False]
|
NotImplemented -> [Model $ model & msgAB ?~ "Function not implemented..." & menuPopup .~ False]
|
||||||
CloseMsgAB -> [Model $ model & msgAB .~ Nothing & inError .~ False]
|
CloseMsgAB -> [Model $ model & msgAB .~ Nothing & inError .~ False]
|
||||||
|
@ -1413,6 +1414,9 @@ timeTicker sendMsg = do
|
||||||
threadDelay $ 1000 * 1000
|
threadDelay $ 1000 * 1000
|
||||||
timeTicker sendMsg
|
timeTicker sendMsg
|
||||||
|
|
||||||
|
txtWrapN :: T.Text -> Int -> T.Text
|
||||||
|
txtWrapN t n = wrapText (WrapSettings False True NoFill FillAfterFirst) n t
|
||||||
|
|
||||||
txtWrap :: T.Text -> T.Text
|
txtWrap :: T.Text -> T.Text
|
||||||
txtWrap = wrapText (WrapSettings False True NoFill FillAfterFirst) 32
|
txtWrap = wrapText (WrapSettings False True NoFill FillAfterFirst) 32
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue