From 36a7625e57ea66d7b106d9a66280eadc9f3f0a59 Mon Sep 17 00:00:00 2001 From: paolino Date: Wed, 18 Sep 2024 16:40:39 +0000 Subject: [PATCH] Add query customer address form --- .../Wallet/UI/Deposit/Html/Pages/Wallet.hs | 28 ++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/lib/ui/src/Cardano/Wallet/UI/Deposit/Html/Pages/Wallet.hs b/lib/ui/src/Cardano/Wallet/UI/Deposit/Html/Pages/Wallet.hs index c980c56788e..c9faf3ea08d 100644 --- a/lib/ui/src/Cardano/Wallet/UI/Deposit/Html/Pages/Wallet.hs +++ b/lib/ui/src/Cardano/Wallet/UI/Deposit/Html/Pages/Wallet.hs @@ -183,10 +183,30 @@ deleteWalletModalH = walletElementH :: (BL.ByteString -> Html ()) -> WalletPresent -> Html () walletElementH alert = \case WalletPresent (WalletPublicIdentity xpub customers) -> do - record $ do - simpleField "Public Key" $ pubKeyH xpub - simpleField "Customer Discovery" $ toHtml $ toText customers - div_ [class_ "row"] $ do + div_ [class_ "row mt-5 "] $ do + h5_ [class_ "text-center"] "Wallet Details" + div_ [class_ "col"] $ record $ do + simpleField "Public Key" $ pubKeyH xpub + simpleField "Customer Discovery" $ toHtml $ toText customers + div_ [class_ "row mt-5"] $ do + h5_ [class_ "text-center"] "Query Address" + div_ [class_ "col-3"] + $ + input_ + [ type_ "number" + , hxTarget_ "#customer-address" + , class_ "form-control" + , hxTrigger_ "change" + , hxPost_ $ linkText customerAddressLink + , min_ "0" + , max_ $ toText $ customers - 1 + , step_ "1" + , name_ "customer" + ] + div_ [class_ "col-9", id_ "customer-address"] $ do + "Customer Address" + div_ [class_ "row mt-5"] $ do + h5_ [class_ "text-center"] "Actions" div_ [class_ "col"] $ do deleteWalletButtonH div_ [id_ "delete-result"] mempty