wip: more liveview and webview custom client
This commit is contained in:
1 parent
7856f2b153
commit
9b560dfedb
20 files changed
+75
-27
No files matched your search
@@ -21,5 +21,17 @@ thiserror = "1.0.23"
|
||||
log = "0.4.13"
|
||||
fern = { version = "0.6.0", features = ["colored"] }
|
||||
|
||||
# thiserror = "1.0.23"
|
||||
# log = "0.4.13"
|
||||
# fern = { version = "0.6.0", features = ["colored"] }
|
||||
# wasm-bindgen-cli-support = "0.2.71"
|
||||
# anyhow = "1.0.38"
|
||||
# argh = "0.1.4"
|
||||
# serde = "1.0.120"
|
||||
# serde_json = "1.0.61"
|
||||
# async-std = { version = "1.9.0", features = ["attributes"] }
|
||||
tide = "0.15.0"
|
||||
tide-websockets = "0.3.0"
|
||||
|
||||
|
||||
[build-dependencies]
|
||||
@@ -14,7 +14,10 @@ struct ServerRendered {
|
||||
name7: String,
|
||||
}
|
||||
|
||||
fn main() {
|
||||
fn main() {}
|
||||
|
||||
#[cfg(old)]
|
||||
fn blah() {
|
||||
// connect to the host server
|
||||
|
||||
let server_rendered = use_server_rendered((111111, 11111, 11), SERVER_RENDERED_KEY, || {
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<!-- this is used to instantiate the module -->
|
||||
@@ -2,12 +2,13 @@ use std::sync::mpsc::channel;
|
||||
use std::sync::Arc;
|
||||
|
||||
use dioxus_core::prelude::*;
|
||||
use dioxus_core::virtual_dom::VirtualDom;
|
||||
use web_view::Handle;
|
||||
use web_view::{WVResult, WebView, WebViewBuilder};
|
||||
|
||||
static HTML_CONTENT: &'static str = include_str!("./index.html");
|
||||
static HTML_CONTENT: &'static str = include_str!("./../../liveview/index.html");
|
||||
|
||||
pub fn launch<T: 'static>(
|
||||
pub fn launch<T: Properties + 'static>(
|
||||
builder: impl FnOnce(DioxusWebviewBuilder) -> DioxusWebviewBuilder,
|
||||
props: T,
|
||||
root: FC<T>,
|
||||
@@ -25,7 +26,7 @@ enum InnerEvent {
|
||||
Initiate(Handle<()>),
|
||||
}
|
||||
|
||||
impl<T: 'static> WebviewRenderer<T> {
|
||||
impl<T: Properties + 'static> WebviewRenderer<T> {
|
||||
pub fn run(
|
||||
root: FC<T>,
|
||||
props: T,
|
||||
|
||||
Reference in new issue
Block a user