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 | |
| parent | e99e29c5c6bf6ba12a478d2333a9d6f020592209 (diff) | |
Update
| -rw-r--r-- | config/test.m4 | 6 | ||||
| -rw-r--r-- | flake.lock | 12 | ||||
| -rw-r--r-- | flake.nix | 3 | ||||
| -rw-r--r-- | main.css | 9 | ||||
| -rw-r--r-- | src/Main/Throwshade.purs | 10 | ||||
| -rw-r--r-- | 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"; ') @@ -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": { @@ -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"; }; }; @@ -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 </script> <script type="module" src="./main.js"></script> </head> - <body id="lcolonq-throwshade"> - <div id="teleia-parent" class="lcolonq-throwshade-canvas"></div> - <div id="lcolonq-throwshade-bottom"> - <div id="lcolonq-throwshade-bottom-left"> - <textarea id="lcolonq-throwshade-textarea"> + <body id="lcolonq-throwshade-body"> + <div id="lcolonq-throwshade"> + <div id="teleia-parent" class="lcolonq-throwshade-canvas"></div> + <div id="lcolonq-throwshade-bottom"> + <div id="lcolonq-throwshade-bottom-left"> + <textarea id="lcolonq-throwshade-textarea"> // how to: // the parameter "cs" is a screen coordinate - it ranges from (0, 0) in the top left // to (1.0, 1.0) in the bottom right @@ -43,13 +44,16 @@ CONFIG_SUBST // float chat_time - timestamp (in seconds since shader started) of last chat message vec4 shade(vec2 cs) { return vec4(0.0, 1.0, 0.0, 1.0); -} - </textarea> +}</textarea> </div> <div id="lcolonq-throwshade-bottom-right"> <img id="lcolonq-throwshade-button-test" src="./assets/test.gif"></img> <img id="lcolonq-throwshade-button-submit" src="./assets/upload.gif"></img> </div> </div> + </div> + <pre id="lcolonq-throwshade-current"> + hiiiiiiiii + </div> </body> </html> |
