diff options
| author | LLLL Colonq <llll@colonq> | 2025-02-28 18:58:56 -0500 |
|---|---|---|
| committer | LLLL Colonq <llll@colonq> | 2025-02-28 18:58:56 -0500 |
| commit | ff928393b5ac3d62a61592171de8ebd676a121e9 (patch) | |
| tree | 702566c685d6da0db4216f1ecdd25575a3788bdc /src | |
| parent | e99e29c5c6bf6ba12a478d2333a9d6f020592209 (diff) | |
Update
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 |
