From bad36162af764291f5a031b6233d151f61d745a4 Mon Sep 17 00:00:00 2001 From: Jonathan Kelley Date: Sat, 8 Jan 2022 08:23:26 -0500 Subject: [PATCH] fix: wry pathing --- packages/desktop/src/index.html | 2 +- packages/desktop/src/lib.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/desktop/src/index.html b/packages/desktop/src/index.html index 5228818bd..a67432e98 100644 --- a/packages/desktop/src/index.html +++ b/packages/desktop/src/index.html @@ -15,4 +15,4 @@ - \ No newline at end of file + diff --git a/packages/desktop/src/lib.rs b/packages/desktop/src/lib.rs index 57b859140..e700dfc78 100644 --- a/packages/desktop/src/lib.rs +++ b/packages/desktop/src/lib.rs @@ -174,7 +174,7 @@ pub fn launch_with_props( let mut webview = WebViewBuilder::new(window) .unwrap() - .with_url("wry://index.html/") + .with_url("dioxus://index.html/") .unwrap() .with_rpc_handler(move |_window: &Window, req: RpcRequest| { match req.method.as_str() { @@ -200,7 +200,7 @@ pub fn launch_with_props( wry::http::ResponseBuilder::new() .mimetype("text/html") .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() .mimetype("text/javascript") .body(include_bytes!("./index.js").to_vec())