fix: wry pathing
This commit is contained in:
1 parent
9ae981a1af
commit
bad36162af
1 file changed
+2
-2
@@ -174,7 +174,7 @@ pub fn launch_with_props<P: 'static + Send>(
|
|||||||
|
|
||||||
let mut webview = WebViewBuilder::new(window)
|
let mut webview = WebViewBuilder::new(window)
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.with_url("wry://index.html/")
|
.with_url("dioxus://index.html/")
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.with_rpc_handler(move |_window: &Window, req: RpcRequest| {
|
.with_rpc_handler(move |_window: &Window, req: RpcRequest| {
|
||||||
match req.method.as_str() {
|
match req.method.as_str() {
|
||||||
@@ -200,7 +200,7 @@ pub fn launch_with_props<P: 'static + Send>(
|
|||||||
wry::http::ResponseBuilder::new()
|
wry::http::ResponseBuilder::new()
|
||||||
.mimetype("text/html")
|
.mimetype("text/html")
|
||||||
.body(include_bytes!("./index.html").to_vec())
|
.body(include_bytes!("./index.html").to_vec())
|
||||||
} else if path == "index.js" {
|
} else if path.trim_end_matches("/") == "index.html/index.js" {
|
||||||
wry::http::ResponseBuilder::new()
|
wry::http::ResponseBuilder::new()
|
||||||
.mimetype("text/javascript")
|
.mimetype("text/javascript")
|
||||||
.body(include_bytes!("./index.js").to_vec())
|
.body(include_bytes!("./index.js").to_vec())
|
||||||
|
|||||||
Reference in new issue
Block a user