From 759f73f5f9d62995dbd1fa9b7aa95df09668e5eb Mon Sep 17 00:00:00 2001 From: paolino Date: Wed, 18 Sep 2024 20:10:30 +0000 Subject: [PATCH] Some random embellishments --- .../UI/Common/Html/Pages/Template/Body.hs | 2 +- .../UI/Common/Html/Pages/Template/Footer.hs | 2 +- .../Wallet/UI/Deposit/Html/Pages/Page.hs | 4 ++-- .../Wallet/UI/Deposit/Html/Pages/Wallet.hs | 18 ++++++++++-------- lib/ui/src/Cardano/Wallet/UI/Deposit/Server.hs | 2 +- 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/lib/ui/src/Cardano/Wallet/UI/Common/Html/Pages/Template/Body.hs b/lib/ui/src/Cardano/Wallet/UI/Common/Html/Pages/Template/Body.hs index 19a39bdb2e1..66bf49a83a1 100644 --- a/lib/ui/src/Cardano/Wallet/UI/Common/Html/Pages/Template/Body.hs +++ b/lib/ui/src/Cardano/Wallet/UI/Common/Html/Pages/Template/Body.hs @@ -46,5 +46,5 @@ bodyH sseLink header body = do div_ [class_ "container-fluid"] $ do div_ [class_ "main"] body div_ - [class_ "footer"] + [class_ "footer mt-5"] footerH diff --git a/lib/ui/src/Cardano/Wallet/UI/Common/Html/Pages/Template/Footer.hs b/lib/ui/src/Cardano/Wallet/UI/Common/Html/Pages/Template/Footer.hs index cf705167fc2..e4cc6e6491c 100644 --- a/lib/ui/src/Cardano/Wallet/UI/Common/Html/Pages/Template/Footer.hs +++ b/lib/ui/src/Cardano/Wallet/UI/Common/Html/Pages/Template/Footer.hs @@ -30,7 +30,7 @@ footerH = term "footer_" [ class_ - "text-center text-muted bg-secondary" + "text-center text-muted bg-secondary fs-6" ] $ do div_ [class_ "row d-md-flex align-items-center"] diff --git a/lib/ui/src/Cardano/Wallet/UI/Deposit/Html/Pages/Page.hs b/lib/ui/src/Cardano/Wallet/UI/Deposit/Html/Pages/Page.hs index 58441d0c33c..d28264c0b0f 100644 --- a/lib/ui/src/Cardano/Wallet/UI/Deposit/Html/Pages/Page.hs +++ b/lib/ui/src/Cardano/Wallet/UI/Deposit/Html/Pages/Page.hs @@ -100,8 +100,8 @@ headerH :: Text -> Page -> Monad m => HtmlT m () headerH prefix p = navigationH prefix - [ (is _About p, aboutPageLink, "About") + [ (is _Wallet p, walletPageLink, "Wallet") , (is _Network p, networkPageLink, "Network") , (is _Settings p, settingsPageLink, "Settings") - , (is _Wallet p, walletPageLink, "Wallet") + , (is _About p, aboutPageLink, "About") ] 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 abe253e0daa..7a3ad8d6770 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 @@ -100,6 +100,7 @@ import Lucid , p_ , section_ , type_ + , value_ ) import Lucid.Html5 ( max_ @@ -187,29 +188,30 @@ deleteWalletModalH = walletElementH :: (BL.ByteString -> Html ()) -> WalletPresent -> Html () walletElementH alert = \case WalletPresent (WalletPublicIdentity xpub customers) -> 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"] $ record $ do - simpleField "Customer number" + simpleField "Customer Number" $ input_ [ type_ "number" , hxTarget_ "#customer-address" , class_ "form-control" - , hxTrigger_ "change" + , hxTrigger_ "load, change" , hxPost_ $ linkText customerAddressLink , min_ "0" , max_ $ toText $ customers - 1 , step_ "1" , name_ "customer" + , value_ "0" ] simpleField "Address" $ div_ [id_ "customer-address"] mempty + 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"] "Actions" + h5_ [class_ "text-center"] "Administration" div_ [class_ "col"] $ do deleteWalletButtonH div_ [id_ "delete-result"] mempty diff --git a/lib/ui/src/Cardano/Wallet/UI/Deposit/Server.hs b/lib/ui/src/Cardano/Wallet/UI/Deposit/Server.hs index 678fb49f4ad..d91ccf3ca72 100644 --- a/lib/ui/src/Cardano/Wallet/UI/Deposit/Server.hs +++ b/lib/ui/src/Cardano/Wallet/UI/Deposit/Server.hs @@ -154,7 +154,7 @@ serveUI -> BlockchainSource -> Server UI serveUI tr ul env dbDir config _ nl bs = - ph About + ph Wallet :<|> ph About :<|> ph Network :<|> ph Settings