Milestone 3: RPC server, ZIP-320 #104

Merged
pitmutt merged 152 commits from milestone3 into master 2024-11-21 15:39:19 +00:00
Showing only changes of commit 87feab284e - Show all commits

View file

@ -121,6 +121,7 @@ data AppEvent
| ShowMessage !T.Text | ShowMessage !T.Text
| ShowABAddress !T.Text !T.Text | ShowABAddress !T.Text !T.Text
| CloseShowABAddress | CloseShowABAddress
| CopyABAdress !T.Text
deriving (Eq, Show) deriving (Eq, Show)
data AppModel = AppModel data AppModel = AppModel
@ -809,10 +810,6 @@ buildUI wenv model = widgetTree
, spacer , spacer
, hstack , hstack
[ button "New" NewAdrBkEntry [ button "New" NewAdrBkEntry
, spacer
, button "Edit" notImplemented
, spacer
, button "Copy" notImplemented
] ]
] ]
abookRow :: Int -> Entity AddressBook -> WidgetNode AppModel AppEvent abookRow :: Int -> Entity AddressBook -> WidgetNode AppModel AppEvent
@ -875,7 +872,7 @@ buildUI wenv model = widgetTree
, spacer , spacer
, hstack , hstack
[ filler [ filler
, label_ (txtWrapN abd 64) [multiline] , label (txtWrapN abd 64) `styleBasic` [textFont "Bold"]
, filler , filler
] ]
, spacer , spacer
@ -884,6 +881,14 @@ buildUI wenv model = widgetTree
, label_ (txtWrapN aba 64) [multiline] , label_ (txtWrapN aba 64) [multiline]
, filler , filler
] ]
, spacer
, hstack
[ filler
, button "Edit Entry" NotImplemented
, spacer
, button "Copy address" $ CopyABAdress aba
, filler
]
] ]
msgAdrBookOverlay = msgAdrBookOverlay =
alert CloseMsgAB $ alert CloseMsgAB $
@ -1237,6 +1242,11 @@ handleEvent wenv node model evt =
[ Model $ model & abdescrip .~ d & abaddress .~ a & showABAddress .~ True & menuPopup .~ False ] [ Model $ model & abdescrip .~ d & abaddress .~ a & showABAddress .~ True & menuPopup .~ False ]
CloseShowABAddress -> CloseShowABAddress ->
[Model $ model & showABAddress .~ False & inError .~ False] [Model $ model & showABAddress .~ False & inError .~ False]
CopyABAdress a ->
[ setClipboardData ClipboardEmpty
, setClipboardData $ ClipboardText a
, Event $ ShowMessage "Address copied!!"
]
ShowMessage a -> [Model $ model & msgAB ?~ a & menuPopup .~ False] ShowMessage a -> [Model $ model & msgAB ?~ a & menuPopup .~ False]
NotImplemented -> NotImplemented ->
[ Model $ [ Model $