Minor changes (buttons are now consistent).
This commit is contained in:
parent
86eee44661
commit
46c6acea6b
5 changed files with 20 additions and 43 deletions
|
@ -230,12 +230,8 @@ render { wsUp, current_tab, authenticationForm, passwordRecoveryForm, newPasswor
|
||||||
(HandleAuthenticationInput <<< AUTH_INP_pass) -- action
|
(HandleAuthenticationInput <<< AUTH_INP_pass) -- action
|
||||||
authenticationForm.pass -- value
|
authenticationForm.pass -- value
|
||||||
should_be_disabled -- condition
|
should_be_disabled -- condition
|
||||||
, HH.button
|
, Bulma.btn_validation
|
||||||
[ HP.style "padding: 0.5rem 1.25rem;"
|
|
||||||
, HP.type_ HP.ButtonSubmit
|
|
||||||
, (if wsUp then (HP.enabled true) else (HP.disabled true))
|
|
||||||
]
|
|
||||||
[ HH.text "Send Message to Server" ]
|
|
||||||
]
|
]
|
||||||
|
|
||||||
render_password_recovery_form = HH.form
|
render_password_recovery_form = HH.form
|
||||||
|
@ -248,12 +244,7 @@ render { wsUp, current_tab, authenticationForm, passwordRecoveryForm, newPasswor
|
||||||
(HandlePasswordRecovery <<< PASSR_INP_email) -- action
|
(HandlePasswordRecovery <<< PASSR_INP_email) -- action
|
||||||
passwordRecoveryForm.email -- value
|
passwordRecoveryForm.email -- value
|
||||||
should_be_disabled -- condition
|
should_be_disabled -- condition
|
||||||
, HH.button
|
, Bulma.btn_validation
|
||||||
[ HP.style "padding: 0.5rem 1.25rem;"
|
|
||||||
, HP.type_ HP.ButtonSubmit
|
|
||||||
, (if wsUp then (HP.enabled true) else (HP.disabled true))
|
|
||||||
]
|
|
||||||
[ HH.text "Send Message to Server" ]
|
|
||||||
]
|
]
|
||||||
|
|
||||||
render_new_password_form = HH.form
|
render_new_password_form = HH.form
|
||||||
|
@ -274,12 +265,7 @@ render { wsUp, current_tab, authenticationForm, passwordRecoveryForm, newPasswor
|
||||||
(HandleNewPassword <<< NEWPASS_INP_confirmation)
|
(HandleNewPassword <<< NEWPASS_INP_confirmation)
|
||||||
newPasswordForm.confirmation
|
newPasswordForm.confirmation
|
||||||
should_be_disabled
|
should_be_disabled
|
||||||
, HH.button
|
, Bulma.btn_validation
|
||||||
[ HP.style "padding: 0.5rem 1.25rem;"
|
|
||||||
, HP.type_ HP.ButtonSubmit
|
|
||||||
, (if wsUp then (HP.enabled true) else (HP.disabled true))
|
|
||||||
]
|
|
||||||
[ HH.text "Send Message to Server" ]
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,6 @@ import Halogen as H
|
||||||
import Halogen.HTML as HH
|
import Halogen.HTML as HH
|
||||||
import Halogen.HTML.Events as HE
|
import Halogen.HTML.Events as HE
|
||||||
import Halogen.HTML.Events as HHE
|
import Halogen.HTML.Events as HHE
|
||||||
import Halogen.HTML.Properties as HP
|
|
||||||
import Web.Event.Event as Event
|
import Web.Event.Event as Event
|
||||||
import Web.Event.Event (Event)
|
import Web.Event.Event (Event)
|
||||||
import Bulma as Bulma
|
import Bulma as Bulma
|
||||||
|
@ -32,7 +31,6 @@ import App.DisplayErrors (error_to_paragraph_label)
|
||||||
|
|
||||||
import App.Validation.Label as Validation
|
import App.Validation.Label as Validation
|
||||||
|
|
||||||
import CSSClasses as C
|
|
||||||
import App.Type.LogMessage
|
import App.Type.LogMessage
|
||||||
import App.Message.DNSManagerDaemon as DNSManager
|
import App.Message.DNSManagerDaemon as DNSManager
|
||||||
|
|
||||||
|
@ -164,7 +162,7 @@ render { accepted_domains, my_domains, newDomainForm, wsUp, active_modal }
|
||||||
false -> Bulma.p "You are disconnected."
|
false -> Bulma.p "You are disconnected."
|
||||||
true -> case active_modal of
|
true -> case active_modal of
|
||||||
Nothing -> Bulma.columns_
|
Nothing -> Bulma.columns_
|
||||||
[ Bulma.column_ [ Bulma.h3 "Add a domain!", render_add_domain_form]
|
[ Bulma.column_ [ Bulma.h3 "New domain", render_add_domain_form]
|
||||||
, Bulma.column_ [ Bulma.h3 "My domains"
|
, Bulma.column_ [ Bulma.h3 "My domains"
|
||||||
, HH.ul_ $ map (\domain -> HH.li_ (domain_buttons domain)) my_domains
|
, HH.ul_ $ map (\domain -> HH.li_ (domain_buttons domain)) my_domains
|
||||||
]
|
]
|
||||||
|
@ -194,12 +192,8 @@ render { accepted_domains, my_domains, newDomainForm, wsUp, active_modal }
|
||||||
(HandleNewDomainInput <<< INP_newdomain)
|
(HandleNewDomainInput <<< INP_newdomain)
|
||||||
newDomainForm.new_domain
|
newDomainForm.new_domain
|
||||||
[ HHE.onSelectedIndexChange domain_choice ]
|
[ HHE.onSelectedIndexChange domain_choice ]
|
||||||
accepted_domains
|
(map (\v -> "." <> v) accepted_domains)
|
||||||
, HH.button
|
, Bulma.btn_validation_ "add a new domain"
|
||||||
[ HP.type_ HP.ButtonSubmit
|
|
||||||
, HP.classes C.button
|
|
||||||
]
|
|
||||||
[ HH.text "add a new domain!" ]
|
|
||||||
, if A.length newDomainForm._errors > 0
|
, if A.length newDomainForm._errors > 0
|
||||||
then HH.div_ $ map error_to_paragraph_label newDomainForm._errors
|
then HH.div_ $ map error_to_paragraph_label newDomainForm._errors
|
||||||
else HH.div_ [ ]
|
else HH.div_ [ ]
|
||||||
|
|
|
@ -110,14 +110,7 @@ render { wsUp, mailValidationForm }
|
||||||
(HandleValidationInput <<< VALIDATION_INP_token) -- action
|
(HandleValidationInput <<< VALIDATION_INP_token) -- action
|
||||||
mailValidationForm.token -- value
|
mailValidationForm.token -- value
|
||||||
should_be_disabled -- condition
|
should_be_disabled -- condition
|
||||||
, HH.div_
|
, Bulma.btn_validation
|
||||||
[ HH.button
|
|
||||||
[ HP.style "padding: 0.5rem 1.25rem;"
|
|
||||||
, HP.type_ HP.ButtonSubmit
|
|
||||||
, (if wsUp then (HP.enabled true) else (HP.disabled true))
|
|
||||||
]
|
|
||||||
[ HH.text "Send Message to Server" ]
|
|
||||||
]
|
|
||||||
]
|
]
|
||||||
|
|
||||||
handleAction :: forall m. MonadAff m => Action -> H.HalogenM State Action () Output m Unit
|
handleAction :: forall m. MonadAff m => Action -> H.HalogenM State Action () Output m Unit
|
||||||
|
|
|
@ -117,14 +117,7 @@ render { wsUp, registrationForm }
|
||||||
(HandleRegisterInput <<< REG_INP_pass) -- action
|
(HandleRegisterInput <<< REG_INP_pass) -- action
|
||||||
registrationForm.pass -- value
|
registrationForm.pass -- value
|
||||||
should_be_disabled -- condition
|
should_be_disabled -- condition
|
||||||
, HH.div_
|
, Bulma.btn_validation
|
||||||
[ HH.button
|
|
||||||
[ HP.style "padding: 0.5rem 1.25rem;"
|
|
||||||
, HP.type_ HP.ButtonSubmit
|
|
||||||
, (if wsUp then (HP.enabled true) else (HP.disabled true))
|
|
||||||
]
|
|
||||||
[ HH.text "Send Message to Server" ]
|
|
||||||
]
|
|
||||||
]
|
]
|
||||||
|
|
||||||
handleAction :: forall m. MonadAff m => Action -> H.HalogenM State Action () Output m Unit
|
handleAction :: forall m. MonadAff m => Action -> H.HalogenM State Action () Output m Unit
|
||||||
|
|
|
@ -522,3 +522,14 @@ notification_primary value deleteaction = notification C.is_primary value delete
|
||||||
|
|
||||||
notification_danger :: forall w i. String -> i -> HH.HTML w i
|
notification_danger :: forall w i. String -> i -> HH.HTML w i
|
||||||
notification_danger value deleteaction = notification C.is_danger value deleteaction
|
notification_danger value deleteaction = notification C.is_danger value deleteaction
|
||||||
|
|
||||||
|
btn_validation_ :: forall w i. String -> HH.HTML w i
|
||||||
|
btn_validation_ str = HH.button
|
||||||
|
-- [ HP.style "padding: 0.5rem 1.25rem;"
|
||||||
|
[ HP.type_ HP.ButtonSubmit
|
||||||
|
, HP.classes $ C.button <> C.is_primary
|
||||||
|
]
|
||||||
|
[ HH.text str ]
|
||||||
|
|
||||||
|
btn_validation :: forall w i. HH.HTML w i
|
||||||
|
btn_validation = btn_validation_ "Validate"
|
||||||
|
|
Loading…
Add table
Reference in a new issue