rvv041 - Address Book - Copy ZEC Address to clipboard implemented
- Edit Adress Book entry in progress.
This commit is contained in:
parent
5ce0b5fa0f
commit
87feab284e
1 changed files with 15 additions and 5 deletions
|
@ -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 $
|
||||||
|
|
Loading…
Reference in a new issue