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
|
||||
, 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
|
||||
|
|
|
@ -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 ]
|
||||
|
|
Loading…
Add table
Reference in a new issue