Merge pull request #1622 from ealmloff/cli-config-library

Pull out CLI configs into a separate library
This commit is contained in:
Jonathan Kelley authored and GitHub committed 2024-01-08 13:33:16 -08:00
commit 399e20fd47
34 files changed
+1090 -807

No files matched your search

+1
View File
@@ -19,6 +19,7 @@ dioxus-html = { workspace = true, features = [
] }
dioxus-interpreter-js = { workspace = true, features = ["binary-protocol"] }
dioxus-hot-reload = { workspace = true, optional = true }
dioxus-cli-config = { workspace = true }
serde = "1.0.136"
serde_json = "1.0.79"
+6 -1
View File
@@ -47,7 +47,12 @@ impl Config {
/// Initializes a new `WindowBuilder` with default values.
#[inline]
pub fn new() -> Self {
let window = WindowBuilder::new().with_title("Dioxus app");
let window = WindowBuilder::new().with_title(
dioxus_cli_config::CURRENT_CONFIG
.as_ref()
.map(|c| c.dioxus_config.application.name.clone())
.unwrap_or("Dioxus App".to_string()),
);
Self {
// event_handler: None,