diff --git a/Cargo.toml b/Cargo.toml index 0053288..21a7160 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,12 +26,12 @@ ogg = "0.9.1" ordermap = "0.5.3" html-purifier = "0.3.0" markdown = "0.3.0" -gloo-timers = { version = "0.3.0", features = ["futures"] } +gloo-timers = { version = "0.3.0", features = ["futures"], optional = true } futures-channel = "0.3.30" sir = { version = "0.5.0", features = ["dioxus"] } tokio = { version = "1.41.1", features = ["net", "rt"], optional = true } tokio-rustls = { version = "0.26.0", optional = true } [features] -web = ["dioxus/web", "dioxus-web", "wasm-bindgen", "wasm-bindgen-futures", "wasm-streams", "serde-wasm-bindgen", "js-sys", "web-sys"] +web = ["dioxus/web", "dioxus-web", "wasm-bindgen", "wasm-bindgen-futures", "wasm-streams", "serde-wasm-bindgen", "js-sys", "web-sys", "gloo-timers"] desktop = ["dioxus/desktop", "tokio", "tokio-rustls"] diff --git a/src/app.rs b/src/app.rs index e001db8..3c24393 100644 --- a/src/app.rs +++ b/src/app.rs @@ -20,7 +20,6 @@ pub enum Command { Connect { address: String, username: String, - hash: String, }, SendChat { markdown: String, @@ -348,7 +347,10 @@ pub fn LoginView() -> Element { ); let do_connect = move |_| { - net.send(Connect{address: address.read().clone(), username: username.read().clone(), hash: "[39, 96, 204, 127, 26, 59, 35, 209, 197, 103, 192, 6, 3, 98, 203, 228, 124, 46, 247, 72, 44, 224, 123, 238, 218, 140, 128, 100, 115, 14, 23, 233]".to_string()}) + net.send(Connect { + address: address.read().clone(), + username: username.read().clone(), + }) }; let status = &STATE.status; let bottom = match &*status.read() { diff --git a/src/lib.rs b/src/lib.rs index 15eea61..55abbf4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -41,12 +41,7 @@ macro_rules! bail { pub async fn network_entrypoint(mut event_rx: UnboundedReceiver) { loop { - let Some(Command::Connect { - address, - username, - hash, - }) = event_rx.next().await - else { + let Some(Command::Connect { address, username }) = event_rx.next().await else { panic!("Did not receive connect command") };