stupid lines of cleanup
This commit is contained in:
+2
-2
@@ -26,12 +26,12 @@ ogg = "0.9.1"
|
|||||||
ordermap = "0.5.3"
|
ordermap = "0.5.3"
|
||||||
html-purifier = "0.3.0"
|
html-purifier = "0.3.0"
|
||||||
markdown = "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"
|
futures-channel = "0.3.30"
|
||||||
sir = { version = "0.5.0", features = ["dioxus"] }
|
sir = { version = "0.5.0", features = ["dioxus"] }
|
||||||
tokio = { version = "1.41.1", features = ["net", "rt"], optional = true }
|
tokio = { version = "1.41.1", features = ["net", "rt"], optional = true }
|
||||||
tokio-rustls = { version = "0.26.0", optional = true }
|
tokio-rustls = { version = "0.26.0", optional = true }
|
||||||
|
|
||||||
[features]
|
[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"]
|
desktop = ["dioxus/desktop", "tokio", "tokio-rustls"]
|
||||||
|
|||||||
+4
-2
@@ -20,7 +20,6 @@ pub enum Command {
|
|||||||
Connect {
|
Connect {
|
||||||
address: String,
|
address: String,
|
||||||
username: String,
|
username: String,
|
||||||
hash: String,
|
|
||||||
},
|
},
|
||||||
SendChat {
|
SendChat {
|
||||||
markdown: String,
|
markdown: String,
|
||||||
@@ -348,7 +347,10 @@ pub fn LoginView() -> Element {
|
|||||||
);
|
);
|
||||||
|
|
||||||
let do_connect = move |_| {
|
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 status = &STATE.status;
|
||||||
let bottom = match &*status.read() {
|
let bottom = match &*status.read() {
|
||||||
|
|||||||
+1
-6
@@ -41,12 +41,7 @@ macro_rules! bail {
|
|||||||
|
|
||||||
pub async fn network_entrypoint(mut event_rx: UnboundedReceiver<Command>) {
|
pub async fn network_entrypoint(mut event_rx: UnboundedReceiver<Command>) {
|
||||||
loop {
|
loop {
|
||||||
let Some(Command::Connect {
|
let Some(Command::Connect { address, username }) = event_rx.next().await else {
|
||||||
address,
|
|
||||||
username,
|
|
||||||
hash,
|
|
||||||
}) = event_rx.next().await
|
|
||||||
else {
|
|
||||||
panic!("Did not receive connect command")
|
panic!("Did not receive connect command")
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user