Phrasing, again.
parent
843c6217ed
commit
5819ed0ed4
|
@ -590,7 +590,7 @@ handleAction = case _ of
|
||||||
handleAction $ DispatchAuthDaemonMessage m
|
handleAction $ DispatchAuthDaemonMessage m
|
||||||
(AuthD.GotErrorPasswordTooShort _) -> do
|
(AuthD.GotErrorPasswordTooShort _) -> do
|
||||||
handleAction $ Log $ ErrorLog "Password too short."
|
handleAction $ Log $ ErrorLog "Password too short."
|
||||||
handleAction $ AddNotif $ BadNotification "The server told that your password is too short."
|
handleAction $ AddNotif $ BadNotification "Your password is too short."
|
||||||
(AuthD.GotErrorMailRequired _) -> do
|
(AuthD.GotErrorMailRequired _) -> do
|
||||||
handleAction $ Log $ ErrorLog "Email required."
|
handleAction $ Log $ ErrorLog "Email required."
|
||||||
handleAction $ AddNotif $ BadNotification "An email is required."
|
handleAction $ AddNotif $ BadNotification "An email is required."
|
||||||
|
@ -773,7 +773,7 @@ handleAction = case _ of
|
||||||
handleAction $ AddNotif $ GoodNotification successlog
|
handleAction $ AddNotif $ GoodNotification successlog
|
||||||
handleAction $ DispatchDNSMessage m
|
handleAction $ DispatchDNSMessage m
|
||||||
m@(DNSManager.MkRRDeleted response) -> do
|
m@(DNSManager.MkRRDeleted response) -> do
|
||||||
handleAction $ Log $ SuccessLog $ "RR (rrid: \"" <> show response.rrid <> "\") has been deleted."
|
handleAction $ Log $ SuccessLog $ "Resource record (rrid: \"" <> show response.rrid <> "\") has been deleted."
|
||||||
handleAction $ DispatchDNSMessage m
|
handleAction $ DispatchDNSMessage m
|
||||||
m@(DNSManager.MkZone _) -> do
|
m@(DNSManager.MkZone _) -> do
|
||||||
handleAction $ Log $ SuccessLog $ "Zone received."
|
handleAction $ Log $ SuccessLog $ "Zone received."
|
||||||
|
|
|
@ -372,7 +372,7 @@ render state
|
||||||
where
|
where
|
||||||
modal_delete_button = Bulma.alert_btn "Delete the resource record" (RemoveRR rr_id)
|
modal_delete_button = Bulma.alert_btn "Delete the resource record" (RemoveRR rr_id)
|
||||||
warning_message
|
warning_message
|
||||||
= HH.p [] [ HH.text "You are about to delete a resource record, this actions is "
|
= HH.p [] [ HH.text "You are about to delete a resource record, this action is "
|
||||||
, Bulma.strong "irreversible"
|
, Bulma.strong "irreversible"
|
||||||
, HH.text "."
|
, HH.text "."
|
||||||
]
|
]
|
||||||
|
@ -419,7 +419,7 @@ render state
|
||||||
UpdateRRModal ->
|
UpdateRRModal ->
|
||||||
if A.elem state._currentRR.rrtype ["A", "AAAA"]
|
if A.elem state._currentRR.rrtype ["A", "AAAA"]
|
||||||
then [ Bulma.field_entry ("token" <> state._currentRR.rrtype) "Token"
|
then [ Bulma.field_entry ("token" <> state._currentRR.rrtype) "Token"
|
||||||
(Bulma.p $ fromMaybe "❌" state._currentRR.token)
|
(maybe (Bulma.text "❌") Bulma.p state._currentRR.token)
|
||||||
]
|
]
|
||||||
else []
|
else []
|
||||||
_ -> []
|
_ -> []
|
||||||
|
@ -647,7 +647,7 @@ render state
|
||||||
NoModal -> "Error: no modal should be displayed"
|
NoModal -> "Error: no modal should be displayed"
|
||||||
NewRRModal t_ -> "New " <> show t_ <> " resource record"
|
NewRRModal t_ -> "New " <> show t_ <> " resource record"
|
||||||
UpdateRRModal -> "Update " <> state._currentRR.rrtype <> " Resource Record"
|
UpdateRRModal -> "Update " <> state._currentRR.rrtype <> " Resource Record"
|
||||||
RemoveRRModal rr_id -> "Error: should display removal modal instead (for RR " <> show rr_id <> ")"
|
RemoveRRModal rr_id -> "Error: should display removal modal instead (for resource record " <> show rr_id <> ")"
|
||||||
foot = foot_ <> [Bulma.cancel_button CancelModal]
|
foot = foot_ <> [Bulma.cancel_button CancelModal]
|
||||||
|
|
||||||
zip_nullable :: forall a. Array a -> Array String -> Array (Tuple a String)
|
zip_nullable :: forall a. Array a -> Array String -> Array (Tuple a String)
|
||||||
|
@ -678,7 +678,7 @@ handleAction = case _ of
|
||||||
CreateUpdateRRModal rr_id -> do
|
CreateUpdateRRModal rr_id -> do
|
||||||
state <- H.get
|
state <- H.get
|
||||||
case first (\rr -> rr.rrid == rr_id) state._resources of
|
case first (\rr -> rr.rrid == rr_id) state._resources of
|
||||||
Nothing -> H.raise $ Log $ ErrorLog $ "RR not found (RR " <> show rr_id <> ")"
|
Nothing -> H.raise $ Log $ ErrorLog $ "Resource Record " <> show rr_id <> " not found"
|
||||||
Just rr -> do
|
Just rr -> do
|
||||||
H.modify_ _ { _currentRR = rr }
|
H.modify_ _ { _currentRR = rr }
|
||||||
_ <- case rr.rrtype of
|
_ <- case rr.rrtype of
|
||||||
|
@ -753,7 +753,7 @@ handleAction = case _ of
|
||||||
state <- H.get
|
state <- H.get
|
||||||
case Validation.validation state._currentRR of
|
case Validation.validation state._currentRR of
|
||||||
Left actual_errors -> do
|
Left actual_errors -> do
|
||||||
-- H.raise $ Log $ ErrorLog $ "Cannot add this " <> show t <> " RR, some errors occured in the record:"
|
-- H.raise $ Log $ ErrorLog $ "Cannot add this " <> show t <> " resource record, some errors occured in the record:"
|
||||||
-- loopE (\v -> H.raise $ Log $ ErrorLog $ "==> " <> show_error v) actual_errors
|
-- loopE (\v -> H.raise $ Log $ ErrorLog $ "==> " <> show_error v) actual_errors
|
||||||
H.modify_ _ { _currentRR_errors = actual_errors }
|
H.modify_ _ { _currentRR_errors = actual_errors }
|
||||||
Right newrr -> do
|
Right newrr -> do
|
||||||
|
@ -815,7 +815,7 @@ handleAction = case _ of
|
||||||
|
|
||||||
SaveRR rr -> do
|
SaveRR rr -> do
|
||||||
state <- H.get
|
state <- H.get
|
||||||
H.raise $ Log $ SystemLog $ "Updating RR " <> show rr.rrid
|
H.raise $ Log $ SystemLog $ "Updating resource record " <> show rr.rrid
|
||||||
H.modify_ _ { _zonefile = Nothing }
|
H.modify_ _ { _zonefile = Nothing }
|
||||||
message <- H.liftEffect
|
message <- H.liftEffect
|
||||||
$ DNSManager.serialize
|
$ DNSManager.serialize
|
||||||
|
|
Loading…
Reference in New Issue