From c4f5f81b63d0e7986290b0060ea94960c4c520fe Mon Sep 17 00:00:00 2001 From: Philippe Pittoli Date: Sun, 24 Mar 2024 00:42:23 +0100 Subject: [PATCH] A lot of small details. --- src/App/Container.purs | 2 +- src/App/Page/Setup.purs | 21 +++++++++------------ src/App/Page/Zone.purs | 4 ++-- src/Bulma.purs | 3 +++ 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/App/Container.purs b/src/App/Container.purs index 688c5be..b2fa9df 100644 --- a/src/App/Container.purs +++ b/src/App/Container.purs @@ -241,7 +241,7 @@ render state , render_nav , case state.notif of NoNotification -> HH.div_ [] - GoodNotification v -> Bulma.box [Bulma.notification_primary v CloseNotif] + GoodNotification v -> Bulma.box [Bulma.notification_success v CloseNotif] BadNotification v -> Bulma.box [Bulma.notification_danger v CloseNotif] , case state.current_page of Home -> render_home diff --git a/src/App/Page/Setup.purs b/src/App/Page/Setup.purs index b813005..2d9347e 100644 --- a/src/App/Page/Setup.purs +++ b/src/App/Page/Setup.purs @@ -84,14 +84,16 @@ initialState token = render :: forall m. State -> H.ComponentHTML Action () m render { modal, wsUp, newPasswordForm } = - case modal of - DeleteAccountModal -> render_delete_account_modal - NoModal -> Bulma.columns_ [ b [ Bulma.h3 "Change password", render_new_password_form ] - , b [ Bulma.h3 "Delete account", render_delete_account ] - ] + Bulma.section_small + [ case modal of + DeleteAccountModal -> render_delete_account_modal + NoModal -> Bulma.columns_ [ b [ Bulma.h3 "Change password", render_new_password_form ] + , b [ Bulma.h3 "Delete account", render_delete_account ] + ] + ] where - b e = Bulma.column_ [ Bulma.box e ] + b e = Bulma.column_ e should_be_disabled = (if wsUp then (HP.enabled true) else (HP.disabled true)) render_delete_account = Bulma.alert_btn "Delete my account" DeleteAccountPopup @@ -105,12 +107,7 @@ render { modal, wsUp, newPasswordForm } = (HandleNewPassword <<< NEWPASS_INP_confirmation) newPasswordForm.confirmation should_be_disabled - , HH.button - [ HP.style "padding: 0.5rem 1.25rem;" - , HP.type_ HP.ButtonSubmit - , (if wsUp then (HP.enabled true) else (HP.disabled true)) - ] - [ HH.text "Send Message to Server" ] + , Bulma.btn_validation ] render_delete_account_modal = Bulma.modal "Delete your account" diff --git a/src/App/Page/Zone.purs b/src/App/Page/Zone.purs index 8c09358..eca0ad3 100644 --- a/src/App/Page/Zone.purs +++ b/src/App/Page/Zone.purs @@ -341,7 +341,7 @@ render state modal_rr_delete rr_id = Bulma.modal "Deleting a resource record" [warning_message] [modal_delete_button, Bulma.cancel_button CancelModal] where - modal_delete_button = Bulma.alert_btn "Delete the resource record." (RemoveRR rr_id) + modal_delete_button = Bulma.alert_btn "Delete the resource record" (RemoveRR rr_id) warning_message = HH.p [] [ HH.text "You are about to delete a resource record, this actions is " , Bulma.strong "irreversible" @@ -1009,7 +1009,7 @@ render_new_records _ ] [] , Bulma.hr , Bulma.level [ - Bulma.btn "Get the final zone file." AskZoneFile + Bulma.btn "Get the final zone file" AskZoneFile ] [HH.text "For debug purposes. ⚠"] ] diff --git a/src/Bulma.purs b/src/Bulma.purs index 536121a..6ec0e50 100644 --- a/src/Bulma.purs +++ b/src/Bulma.purs @@ -520,6 +520,9 @@ notification classes value deleteaction = notification_primary :: forall w i. String -> i -> HH.HTML w i notification_primary value deleteaction = notification C.is_primary value deleteaction +notification_success :: forall w i. String -> i -> HH.HTML w i +notification_success value deleteaction = notification C.is_success value deleteaction + notification_danger :: forall w i. String -> i -> HH.HTML w i notification_danger value deleteaction = notification C.is_danger value deleteaction