Compare commits
No commits in common. "5d6c1b33e6a970c4eef966cff642c26df3fbb4e8" and "3ed19882318cc4ac179a857e39e85bcab3757e55" have entirely different histories.
5d6c1b33e6
...
3ed1988231
@ -326,9 +326,7 @@ handleAction = case _ of
|
|||||||
Routing page -> do
|
Routing page -> do
|
||||||
-- Store the current page we are on and restore it when we reload.
|
-- Store the current page we are on and restore it when we reload.
|
||||||
sessionstorage <- H.liftEffect $ Window.sessionStorage =<< HTML.window
|
sessionstorage <- H.liftEffect $ Window.sessionStorage =<< HTML.window
|
||||||
H.liftEffect $ Storage.setItem "current-page" (case page of
|
H.liftEffect $ Storage.setItem "current-page" (show page) sessionstorage
|
||||||
Zone _ -> "Zone"
|
|
||||||
_ -> show page) sessionstorage
|
|
||||||
|
|
||||||
_ <- case page of
|
_ <- case page of
|
||||||
Zone zone -> H.liftEffect $ Storage.setItem "current-zone" zone sessionstorage
|
Zone zone -> H.liftEffect $ Storage.setItem "current-zone" zone sessionstorage
|
||||||
|
@ -253,17 +253,17 @@ handleAction = case _ of
|
|||||||
{ newDomainForm } <- H.get
|
{ newDomainForm } <- H.get
|
||||||
let new_domain = build_new_domain newDomainForm.new_domain newDomainForm.selected_domain
|
let new_domain = build_new_domain newDomainForm.new_domain newDomainForm.selected_domain
|
||||||
|
|
||||||
case newDomainForm.new_domain, newDomainForm._errors, new_domain of
|
case newDomainForm._errors, new_domain of
|
||||||
"", _, _ ->
|
_, "" ->
|
||||||
H.raise $ Log $ UnableToSend "You didn't enter the new domain!"
|
H.raise $ Log $ UnableToSend "You didn't enter the new domain!"
|
||||||
_, [], _ -> do
|
[], _ -> do
|
||||||
message <- H.liftEffect
|
message <- H.liftEffect
|
||||||
$ 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 $ SystemLog $ "Add a new domain (" <> new_domain <> ")"
|
H.raise $ Log $ SystemLog $ "Add a new domain (" <> new_domain <> ")"
|
||||||
handleAction $ HandleNewDomainInput $ INP_newdomain ""
|
handleAction $ HandleNewDomainInput $ INP_newdomain ""
|
||||||
_, _, _ ->
|
_, _ ->
|
||||||
H.raise $ Log $ UnableToSend $ "The new domain name is invalid."
|
H.raise $ Log $ UnableToSend $ "The new domain name is invalid."
|
||||||
|
|
||||||
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)
|
||||||
|
Loading…
Reference in New Issue
Block a user