Change the way current & pending email addresses are displayed.
This commit is contained in:
parent
b3be75c2fb
commit
3b7cbb55ac
@ -16,6 +16,7 @@ import Web.Event.Event as Event
|
||||
import Web.Event.Event (Event)
|
||||
|
||||
import Bulma as Bulma
|
||||
import CSSClasses as C
|
||||
|
||||
import App.Type.Email as Email
|
||||
import App.Validation.Email as E
|
||||
@ -108,15 +109,16 @@ render { modal, newPasswordForm, new_email_address, emails } =
|
||||
where
|
||||
b e = Bulma.column_ e
|
||||
|
||||
render_emails (Tuple current pending)
|
||||
= HH.div []
|
||||
[ case current of
|
||||
Just (Email.Email e) -> Bulma.p $ "Current email address: " <> e
|
||||
Nothing -> Bulma.p "You do not currently have a validated email address!"
|
||||
, case pending of
|
||||
Just (Email.Email e) -> Bulma.p $ "Pending email address: " <> e
|
||||
Nothing -> Bulma.p "You do not have a pending email address."
|
||||
]
|
||||
render_emails (Tuple current pending) = HH.div [] $ render_current current <> render_pending pending
|
||||
where
|
||||
render_current (Just (Email.Email e)) = [ Bulma.p $ "Current email address: " ] <>
|
||||
[ Bulma.btn_ro (C.is_small <> C.is_warning) e]
|
||||
render_current Nothing = [ Bulma.p "You do not currently have a validated email address!" ]
|
||||
|
||||
render_pending (Just (Email.Email e)) = [ Bulma.p $ "Pending email address: " ] <>
|
||||
[ Bulma.btn_ro (C.is_small <> C.is_warning) e]
|
||||
render_pending Nothing = []
|
||||
|
||||
render_delete_account = Bulma.alert_btn "Delete my account" DeleteAccountPopup
|
||||
|
||||
render_new_email_form = HH.form
|
||||
|
Loading…
Reference in New Issue
Block a user