From ff928393b5ac3d62a61592171de8ebd676a121e9 Mon Sep 17 00:00:00 2001 From: LLLL Colonq Date: Fri, 28 Feb 2025 18:58:56 -0500 Subject: Update --- src/Main/Throwshade.purs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/Main/Throwshade.purs') 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 -- cgit v1.2.3