A lot of small details.

master
Philippe Pittoli 2024-03-24 00:42:23 +01:00
parent b23b507f98
commit c4f5f81b63
4 changed files with 15 additions and 15 deletions

View File

@ -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

View File

@ -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"

View File

@ -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. ⚠"]
]

View File

@ -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