Style (minor). Are sections even useful?

beta
Philippe Pittoli 2023-07-05 07:14:49 +02:00
parent 9f4600b1e8
commit 0fb4fcd608
3 changed files with 13 additions and 7 deletions

View File

@ -62,8 +62,8 @@ render state
[ render_header [ render_header
, render_auth_form , render_auth_form
, render_newdomain_interface , render_newdomain_interface
, render_authd_admin_interface
, Bulma.columns_ [ Bulma.column_ [ render_logs ], Bulma.column_ [ render_auth_WS, render_dnsmanager_WS ] ] , Bulma.columns_ [ Bulma.column_ [ render_logs ], Bulma.column_ [ render_auth_WS, render_dnsmanager_WS ] ]
, render_authd_admin_interface
] ]
where where

View File

@ -104,10 +104,9 @@ initialState token =
render :: forall m. State -> H.ComponentHTML Action () m render :: forall m. State -> H.ComponentHTML Action () m
render { accepted_domains, my_domains, newDomainForm, wsUp } render { accepted_domains, my_domains, newDomainForm, wsUp }
= HH.div_ = Bulma.section_medium
[ Bulma.columns_ [ Bulma.column_ newdomain_form [ Bulma.columns_ [ Bulma.column_ newdomain_form, Bulma.column_ list_of_own_domains ]
, Bulma.column_ list_of_own_domains ] ]
]
where where
newdomain_form newdomain_form
@ -116,7 +115,7 @@ render { accepted_domains, my_domains, newDomainForm, wsUp }
] ]
list_of_own_domains list_of_own_domains
= [ Bulma.h3 "My domains:" = [ 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
] ]
@ -188,7 +187,7 @@ handleAction = case _ of
$ DNSManager.serialize $ DNSManager.serialize
$ DNSManager.MkNewDomain { domain: new_domain } $ DNSManager.MkNewDomain { domain: new_domain }
H.raise $ MessageToSend message H.raise $ MessageToSend message
H.raise $ Log $ SimpleLog "[😇] Trying to add a new domain" H.raise $ Log $ SimpleLog $ "[😇] Trying to add a new domain (" <> new_domain <> ")"
handleAction $ HandleNewDomainInput $ INP_newdomain "" handleAction $ HandleNewDomainInput $ INP_newdomain ""
handleQuery :: forall a m. MonadAff m => Query a -> H.HalogenM State Action () Output m (Maybe a) handleQuery :: forall a m. MonadAff m => Query a -> H.HalogenM State Action () Output m (Maybe a)

View File

@ -346,6 +346,13 @@ box_password = field_inner true
class_has_addons :: Array (HH.ClassName) class_has_addons :: Array (HH.ClassName)
class_has_addons = [HH.ClassName "has-addons"] class_has_addons = [HH.ClassName "has-addons"]
class_section :: Array (HH.ClassName)
class_section = [HH.ClassName "section"]
class_medium :: Array (HH.ClassName)
class_medium = [HH.ClassName "is-medium"]
section_medium = HH.section [ HP.classes (class_section <> class_medium) ]
field classes = HH.div [ HP.classes (class_field <> classes) ] field classes = HH.div [ HP.classes (class_field <> classes) ]
class_input :: Array (HH.ClassName) class_input :: Array (HH.ClassName)