Merge branch 'master' into intigrate-collect-assets
This commit is contained in:
1 parent
ffb5de91d1
commit
f976e08f71
379 files changed
+1962
-13517
No files matched your search
@@ -194,7 +194,7 @@ impl DesktopService {
|
||||
/// launch print modal
|
||||
pub fn print(&self) {
|
||||
if let Err(e) = self.webview.print() {
|
||||
log::warn!("Open print modal failed: {e}");
|
||||
tracing::warn!("Open print modal failed: {e}");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ impl DesktopService {
|
||||
self.webview.open_devtools();
|
||||
|
||||
#[cfg(not(debug_assertions))]
|
||||
log::warn!("Devtools are disabled in release builds");
|
||||
tracing::warn!("Devtools are disabled in release builds");
|
||||
}
|
||||
|
||||
/// Create a wry event handler that listens for wry events.
|
||||
|
||||
@@ -334,7 +334,7 @@ pub fn launch_with_props<P: 'static>(root: Component<P>, props: P, cfg: Config)
|
||||
if temp.contains_key("href") {
|
||||
let open = webbrowser::open(temp["href"].as_str().unwrap());
|
||||
if let Err(e) = open {
|
||||
log::error!("Open Browser error: {:?}", e);
|
||||
tracing::error!("Open Browser error: {:?}", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ pub(super) fn desktop_handler(
|
||||
.map_err(From::from);
|
||||
}
|
||||
|
||||
log::error!(
|
||||
tracing::error!(
|
||||
"Failed to find {} (as path {})",
|
||||
request.uri().path(),
|
||||
asset.display()
|
||||
|
||||
@@ -123,7 +123,7 @@ impl QueryEngine {
|
||||
}})
|
||||
}})();"#
|
||||
)) {
|
||||
log::warn!("Query error: {err}");
|
||||
tracing::warn!("Query error: {err}");
|
||||
}
|
||||
|
||||
Query {
|
||||
|
||||
@@ -8,7 +8,6 @@ One of Dioxus' flagship features is the ability to quickly build a native deskto
|
||||
|
||||
Dioxus Desktop is built off Tauri. Right now there aren't any Dioxus abstractions over the menubar, handling, etc, so you'll want to leverage Tauri - mostly [Wry](http://github.com/tauri-apps/wry/) and [Tao](http://github.com/tauri-apps/tao) directly. An upcoming release of Dioxus-Desktop will include components and hooks for notifications, global shortcuts, menubar, etc.
|
||||
|
||||
|
||||
## Getting Set up
|
||||
|
||||
Getting Set up with Dioxus-Desktop is quite easy. Make sure you have Rust and Cargo installed, and then create a new project:
|
||||
@@ -44,9 +43,8 @@ fn app(cx: Scope) -> Element {
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
To configure the webview, menubar, and other important desktop-specific features, checkout out some of the launch configuration in the [API reference](https://docs.rs/dioxus-desktop/).
|
||||
|
||||
## Future Steps
|
||||
|
||||
Make sure to read the [Dioxus Guide](https://dioxuslabs.com/docs/0.3/guide/en) if you already haven't!
|
||||
Make sure to read the [Dioxus Guide](https://dioxuslabs.com/learn/0.4/) if you already haven't!
|
||||
Reference in new issue
Block a user