diff --git a/README.md b/README.md index d87ac84..2064021 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ see https://github.com/jonschoning/espial-docker 7. Start a production server: ``` - stack exec espial -- +RTS -T + stack exec espial ``` see `config/settings.yml` for changing default run-time parameters / environment variables diff --git a/purs/src/Component/Add.purs b/purs/src/Component/Add.purs index 1db7b00..406ab81 100644 --- a/purs/src/Component/Add.purs +++ b/purs/src/Component/Add.purs @@ -1,6 +1,5 @@ module Component.Add where - import Prelude hiding (div) import App (destroy, editBookmark, lookupTitle) @@ -155,6 +154,7 @@ addbmark b' = handleAction :: BAction -> H.HalogenM BState BAction () o Aff Unit handleAction (BDeleteAsk e) = do H.modify_ (_ { deleteAsk = e }) + handleAction BLookupTitle = do H.modify_ (_ { loading = true }) edit_bm <- H.gets _.edit_bm @@ -163,10 +163,12 @@ addbmark b' = Just title' -> _edit_bm %= (_ { title = title' }) Nothing -> pure $ unit H.modify_ (_ { loading = false }) + handleAction (BDestroy) = do bid <- H.gets _.bm.bid void $ H.liftAff (destroy bid) H.modify_ (_ { destroyed = true }) + handleAction (BEditField f) = do _edit_bm %= case f of Eurl e -> _ { url = e } @@ -175,6 +177,7 @@ addbmark b' = Etags e -> _ { tags = e } Eprivate e -> _ { private = e } Etoread e -> _ { toread = e } + handleAction (BEditSubmit e) = do H.liftEffect (preventDefault e) edit_bm <- use _edit_bm