From 3b7cbb55ac149906be2f6b2007dbeed8fa9da2c3 Mon Sep 17 00:00:00 2001 From: Philippe PITTOLI Date: Wed, 10 Jul 2024 00:57:05 +0200 Subject: [PATCH] Change the way current & pending email addresses are displayed. --- src/App/Page/Setup.purs | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/App/Page/Setup.purs b/src/App/Page/Setup.purs index 3424d26..e8e95af 100644 --- a/src/App/Page/Setup.purs +++ b/src/App/Page/Setup.purs @@ -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