From ff928393b5ac3d62a61592171de8ebd676a121e9 Mon Sep 17 00:00:00 2001 From: LLLL Colonq Date: Fri, 28 Feb 2025 18:58:56 -0500 Subject: Update --- config/test.m4 | 6 +++--- flake.lock | 12 ++++++------ flake.nix | 3 +-- main.css | 9 +++++++-- src/Main/Throwshade.purs | 10 ++++++++-- templates/api/throwshade.html | 18 +++++++++++------- 6 files changed, 36 insertions(+), 22 deletions(-) diff --git a/config/test.m4 b/config/test.m4 index a628df0..0b8d565 100644 --- a/config/test.m4 +++ b/config/test.m4 @@ -1,7 +1,7 @@ define(`CONFIG_SUBST', ` globalThis.mode = "api"; -globalThis.apiServer = "http://localhost:8000/api"; -globalThis.secureApiServer = "http://localhost:8000/api"; +globalThis.apiServer = "http://localhost:8080/api"; +globalThis.secureApiServer = "http://localhost:8080/api"; globalThis.clientID = "q486jugzn2my4iw6l181o006ugye4j" -globalThis.authRedirectURL = "http://localhost:8000/register"; +globalThis.authRedirectURL = "http://localhost:8080/register"; ') diff --git a/flake.lock b/flake.lock index 1e4a79a..dda52b5 100644 --- a/flake.lock +++ b/flake.lock @@ -174,15 +174,15 @@ "locked": { "lastModified": 1739925771, "narHash": "sha256-2thrl3I3+Byqe4Mo7eHinq2/iamDd+H52RkPH3pkTiI=", - "ref": "refs/heads/master", + "owner": "lcolonq", + "repo": "newton", "rev": "cfc11a79c914abc5012ffabb5b0697487ae1acfd", - "revCount": 21, - "type": "git", - "url": "ssh://git@github.com/lcolonq/newton" + "type": "github" }, "original": { - "type": "git", - "url": "ssh://git@github.com/lcolonq/newton" + "owner": "lcolonq", + "repo": "newton", + "type": "github" } }, "nixpkgs": { diff --git a/flake.nix b/flake.nix index 351aaf3..cb05619 100644 --- a/flake.nix +++ b/flake.nix @@ -6,8 +6,7 @@ ps-tools.follows = "purs-nix/ps-tools"; purs-nix.url = "github:purs-nix/purs-nix/ps-0.15"; newton = { - # url = "github:lcolonq/newton"; - url = "git+ssh://git@github.com/lcolonq/newton"; + url = "github:lcolonq/newton"; }; }; diff --git a/main.css b/main.css index 5572bd7..cb79905 100644 --- a/main.css +++ b/main.css @@ -503,9 +503,10 @@ a.lcolonq-button-link :active { } /* throwshade */ +#lcolonq-throwshade-body { + overflow-y: scroll; +} #lcolonq-throwshade { - overflow-x: hidden; - overflow-y: hidden; height: 100vh; display: flex; flex-direction: column; @@ -564,5 +565,9 @@ a.lcolonq-button-link :active { max-width: 40%; } #lcolonq-throwshade-bottom-right img { + cursor: pointer; height: 40%; } +#lcolonq-throwshade-current { + margin: 0.5rem; +} 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 diff --git a/templates/api/throwshade.html b/templates/api/throwshade.html index dcf7a9c..c67e2f6 100644 --- a/templates/api/throwshade.html +++ b/templates/api/throwshade.html @@ -29,11 +29,12 @@ CONFIG_SUBST - -
-
-
- +}
+ +
+        hiiiiiiiii
+      
     
 
-- 
cgit v1.2.3