diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Main/Throwshade.purs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/Main/Throwshade.purs b/src/Main/Throwshade.purs index bd7393b..9f5a084 100644 --- a/src/Main/Throwshade.purs +++ b/src/Main/Throwshade.purs @@ -2,17 +2,23 @@ module Main.Throwshade where import Prelude +import Config as Config import Effect (Effect) +import Effect.Aff (launchAff_) import Effect.Class (liftEffect) import Effect.Console (log) +import Fetch (fetch) import UI (setShader, submitShader) -import Utils (byId, getTextArea, listen) +import Utils (byId, getTextArea, listen, setText) main :: Effect Unit -main = do +main = launchAff_ do liftEffect $ log "hello it is throwshade" input <- byId "lcolonq-throwshade-textarea" test <- byId "lcolonq-throwshade-button-test" + { text: shader } <- fetch (Config.apiServer <> "/shader") {} + cur <- byId "lcolonq-throwshade-current" + setText cur =<< shader listen test "click" \_ -> do s <- getTextArea input setShader s |
