feat: more fixes to liveview

This commit is contained in:
Jonathan Kelley committed 2022-12-15 14:25:23 -08:00
1 parent e256fe1079
commit 06e8e096bb
18 files changed
+1454 -1282

No files matched your search

+9 -12
View File
@@ -1,21 +1,19 @@
#![allow(dead_code)]
pub static INTERPRETER: &str = include_str!("interpreter.js");
use dioxus_interpreter_js::INTERPRETER_JS;
static MAIN_JS: &str = include_str!("./main.js");
pub fn interpreter_glue(url: &str) -> String {
format!(
r#"
<script>
var WS_ADDR = "{url}";
{INTERPRETER}
{INTERPRETER_JS}
{MAIN_JS}
main();
</script>
"#
)
}
pub(crate) mod events;
pub mod adapters {
#[cfg(feature = "warp")]
pub mod warp_adapter;
@@ -27,12 +25,11 @@ pub mod adapters {
pub mod salvo_adapter;
}
use std::net::SocketAddr;
use tokio_util::task::LocalPoolHandle;
pub mod pool;
pub use pool::*;
#[derive(Debug, Clone, PartialEq, thiserror::Error)]
pub enum LiveViewError {}
#[derive(Debug, thiserror::Error)]
pub enum LiveViewError {
#[error("Connection Failed")]
Warp(#[from] warp::Error),
}