From 833f1024ef7ba9a3908f7a95ede916f7710dbbb0 Mon Sep 17 00:00:00 2001 From: Philippe Pittoli Date: Thu, 15 May 2025 23:58:31 +0200 Subject: [PATCH] Remove comments and warning message. --- src/App/Container.purs | 17 ---------------- src/App/Page/Migration.purs | 39 +++++-------------------------------- 2 files changed, 5 insertions(+), 51 deletions(-) diff --git a/src/App/Container.purs b/src/App/Container.purs index 00200e6..38b0c20 100644 --- a/src/App/Container.purs +++ b/src/App/Container.purs @@ -271,7 +271,6 @@ render state , render_nav , reconnection_bar , render_notifications - , migration_warning , migration_warning_on_email_address , case state.current_page of Home -> render_home @@ -313,22 +312,6 @@ render state paypal_btn :: forall w i. HH.HTML w i paypal_btn = HH.div [ HP.ref ref_paypal_div ] [] - migration_warning :: forall w. HH.HTML w Action - migration_warning = - Web.big_website_warning - [ Web.p """ - ⚠️​ (FR) le service a été migré d'une ancienne base de code récemment. - Le développement se poursuit mais le service devrait être stable, mis à part quelques redémarrages de temps à autre. - Merci de nous contacter si vous voyez une erreur. - """ - , Web.p """ - ⚠️​ (EN) migration from old codebase was performed. - Development is still on-going but the service should be fairly stable. - Reboots will happen on occasion. - Please contact us in case an error occurs. - """ - ] - migration_warning_on_email_address :: forall w. HH.HTML w Action migration_warning_on_email_address = case state.user_data of diff --git a/src/App/Page/Migration.purs b/src/App/Page/Migration.purs index ecf031d..7c40d1a 100644 --- a/src/App/Page/Migration.purs +++ b/src/App/Page/Migration.purs @@ -54,11 +54,6 @@ type Input = Unit -- | Both value types to validate before sending the appropriate messages to `authd`. data Subject = EmailAddress | Token ---derive instance eqSubject :: Eq Subject ---derive instance genericSubject :: Generic Subject _ ---instance showSubject :: Show Subject where --- show = genericShow - data Action -- | Copy user input in the different HTML inputs. = UserInput Subject String @@ -69,28 +64,15 @@ data Action -- | Send either the new email address or the token to `authd`. | ContactAuthd Subject - -- | Change the current tab. - -- | ChangeTab Subject - -- | The possible errors from the email format. -- | TODO: check the token. data Error = Email (Array E.Error) -- | State is composed of the new email address, the token and the possible errors. -type State - = { email :: String - , token :: String - , errors :: Array Error - -- , current_tab :: Subject - } +type State = { email :: String, token :: String, errors :: Array Error } initialState :: Input -> State -initialState _ - = { email: "" - , token: "" - , errors: [] - -- , current_tab: EmailAddress - } +initialState _ = { email: "", token: "", errors: [] } component :: forall m. MonadAff m => H.Component Query Input Output m component = @@ -99,28 +81,17 @@ component = , render , eval: H.mkEval $ H.defaultEval { handleAction = handleAction - --, handleQuery = handleQuery } } --- TODO: this will be useful in case there is a tab mechanism on this page. ---handleQuery :: forall a m. MonadAff m => Query a -> H.HalogenM State Action () Output m (Maybe a) ---handleQuery = case _ of --- WaitingForToken a -> pure (Just a) - render :: forall m. State -> H.ComponentHTML Action () m -render state - = Web.section_small [Web.columns_ - [ b email_form - , b token_form - ]] - +render state = Web.section_small [ Web.columns_ [ b email_form, b token_form ]] where b e = Web.column_ [ Web.box e ] email_form = [ Web.h3 "New Email address" - -- TODO: put some text here + , Web.content [ Web.p "First, tell what is your new email address to use." ] , HH.form [ HE.onSubmit (Verify EmailAddress) ] [ email_input, email_error, Web.btn_validation ] @@ -136,7 +107,7 @@ render state token_form = [ Web.h3 "Email validation token" - -- TODO: put some text here + , Web.content [ Web.p "Then, verify your new email address with the provided token." ] , HH.form [ HE.onSubmit (Verify Token) ] [ token_input {-, token_error -}, Web.btn_validation ]