Remove comments and warning message.
This commit is contained in:
parent
6d6899d809
commit
833f1024ef
2 changed files with 5 additions and 51 deletions
|
@ -271,7 +271,6 @@ render state
|
||||||
, render_nav
|
, render_nav
|
||||||
, reconnection_bar
|
, reconnection_bar
|
||||||
, render_notifications
|
, render_notifications
|
||||||
, migration_warning
|
|
||||||
, migration_warning_on_email_address
|
, migration_warning_on_email_address
|
||||||
, case state.current_page of
|
, case state.current_page of
|
||||||
Home -> render_home
|
Home -> render_home
|
||||||
|
@ -313,22 +312,6 @@ render state
|
||||||
paypal_btn :: forall w i. HH.HTML w i
|
paypal_btn :: forall w i. HH.HTML w i
|
||||||
paypal_btn = HH.div [ HP.ref ref_paypal_div ] []
|
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 :: forall w. HH.HTML w Action
|
||||||
migration_warning_on_email_address =
|
migration_warning_on_email_address =
|
||||||
case state.user_data of
|
case state.user_data of
|
||||||
|
|
|
@ -54,11 +54,6 @@ type Input = Unit
|
||||||
-- | Both value types to validate before sending the appropriate messages to `authd`.
|
-- | Both value types to validate before sending the appropriate messages to `authd`.
|
||||||
data Subject = EmailAddress | Token
|
data Subject = EmailAddress | Token
|
||||||
|
|
||||||
--derive instance eqSubject :: Eq Subject
|
|
||||||
--derive instance genericSubject :: Generic Subject _
|
|
||||||
--instance showSubject :: Show Subject where
|
|
||||||
-- show = genericShow
|
|
||||||
|
|
||||||
data Action
|
data Action
|
||||||
-- | Copy user input in the different HTML inputs.
|
-- | Copy user input in the different HTML inputs.
|
||||||
= UserInput Subject String
|
= UserInput Subject String
|
||||||
|
@ -69,28 +64,15 @@ data Action
|
||||||
-- | Send either the new email address or the token to `authd`.
|
-- | Send either the new email address or the token to `authd`.
|
||||||
| ContactAuthd Subject
|
| ContactAuthd Subject
|
||||||
|
|
||||||
-- | Change the current tab.
|
|
||||||
-- | ChangeTab Subject
|
|
||||||
|
|
||||||
-- | The possible errors from the email format.
|
-- | The possible errors from the email format.
|
||||||
-- | TODO: check the token.
|
-- | TODO: check the token.
|
||||||
data Error = Email (Array E.Error)
|
data Error = Email (Array E.Error)
|
||||||
|
|
||||||
-- | State is composed of the new email address, the token and the possible errors.
|
-- | State is composed of the new email address, the token and the possible errors.
|
||||||
type State
|
type State = { email :: String, token :: String, errors :: Array Error }
|
||||||
= { email :: String
|
|
||||||
, token :: String
|
|
||||||
, errors :: Array Error
|
|
||||||
-- , current_tab :: Subject
|
|
||||||
}
|
|
||||||
|
|
||||||
initialState :: Input -> State
|
initialState :: Input -> State
|
||||||
initialState _
|
initialState _ = { email: "", token: "", errors: [] }
|
||||||
= { email: ""
|
|
||||||
, token: ""
|
|
||||||
, errors: []
|
|
||||||
-- , current_tab: EmailAddress
|
|
||||||
}
|
|
||||||
|
|
||||||
component :: forall m. MonadAff m => H.Component Query Input Output m
|
component :: forall m. MonadAff m => H.Component Query Input Output m
|
||||||
component =
|
component =
|
||||||
|
@ -99,28 +81,17 @@ component =
|
||||||
, render
|
, render
|
||||||
, eval: H.mkEval $ H.defaultEval
|
, eval: H.mkEval $ H.defaultEval
|
||||||
{ handleAction = handleAction
|
{ 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 :: forall m. State -> H.ComponentHTML Action () m
|
||||||
render state
|
render state = Web.section_small [ Web.columns_ [ b email_form, b token_form ]]
|
||||||
= Web.section_small [Web.columns_
|
|
||||||
[ b email_form
|
|
||||||
, b token_form
|
|
||||||
]]
|
|
||||||
|
|
||||||
where
|
where
|
||||||
b e = Web.column_ [ Web.box e ]
|
b e = Web.column_ [ Web.box e ]
|
||||||
|
|
||||||
email_form
|
email_form
|
||||||
= [ Web.h3 "New Email address"
|
= [ 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
|
, HH.form
|
||||||
[ HE.onSubmit (Verify EmailAddress) ]
|
[ HE.onSubmit (Verify EmailAddress) ]
|
||||||
[ email_input, email_error, Web.btn_validation ]
|
[ email_input, email_error, Web.btn_validation ]
|
||||||
|
@ -136,7 +107,7 @@ render state
|
||||||
|
|
||||||
token_form
|
token_form
|
||||||
= [ Web.h3 "Email validation token"
|
= [ 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
|
, HH.form
|
||||||
[ HE.onSubmit (Verify Token) ]
|
[ HE.onSubmit (Verify Token) ]
|
||||||
[ token_input {-, token_error -}, Web.btn_validation ]
|
[ token_input {-, token_error -}, Web.btn_validation ]
|
||||||
|
|
Loading…
Add table
Reference in a new issue