From 5a7d66b52bfae173630fcbb36dce177da8f5322b Mon Sep 17 00:00:00 2001 From: itsscb Date: Thu, 22 Aug 2024 14:56:13 +0200 Subject: [PATCH] feat: first steps to fetching word --- Cargo.toml | 4 +- frontend/Cargo.toml | 2 + frontend/dist/index.html | 12 ++-- frontend/dist/public/styles.css | 4 ++ frontend/public/styles.css | 4 ++ frontend/src/pages/home.rs | 108 +++++++++++++++++++++++++++++--- src/main.rs | 11 +++- 7 files changed, 129 insertions(+), 16 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index bd69239..34c20b1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,11 +5,13 @@ edition = "2021" [dependencies] axum = "0.7.4" +http = "1.1.0" rand = "0.8.5" shuttle-axum = "0.45.0" shuttle-runtime = "0.45.0" tokio = "1.28.2" -tower-http = { version = "0.5.2", features = ["fs"] } +tower-http = { version = "0.5.2", features = ["fs", "cors"] } +yew = "0.21.0" [workspace] diff --git a/frontend/Cargo.toml b/frontend/Cargo.toml index 2e51ddf..1068b41 100644 --- a/frontend/Cargo.toml +++ b/frontend/Cargo.toml @@ -10,8 +10,10 @@ web-sys = { version = "0.3.69", features = ["HtmlElement", "HtmlInputElement", " yew = { version = "0.21.0", features = ["csr"] } yew-router = { version = "0.18.0"} gloo-console = "0.3.0" +wasm-bindgen-futures = "0.4.43" yewdux = "0.10.0" surrealdb = "1.5.4" +gloo-net = "0.6.0" serde = {version = "1.0.198", features = ["derive"]} serde_json = "1.0.116" regex = "1.10.4" diff --git a/frontend/dist/index.html b/frontend/dist/index.html index e6bf558..27b72aa 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -4,18 +4,18 @@ wordl - + - - + + -