use the name in the dioxus.toml in desktop if no name was set in the desktop config

This commit is contained in:
Evan Almloff committed 2023-11-14 15:53:11 -06:00
1 parent 1ed66a54cc
commit 15984b78db
2 files changed
+7 -1

No files matched your search

+1
View File
@@ -14,6 +14,7 @@ dioxus-core = { workspace = true, features = ["serialize"] }
dioxus-html = { workspace = true, features = ["serialize", "native-bind"] } dioxus-html = { workspace = true, features = ["serialize", "native-bind"] }
dioxus-interpreter-js = { workspace = true } dioxus-interpreter-js = { workspace = true }
dioxus-hot-reload = { workspace = true, optional = true } dioxus-hot-reload = { workspace = true, optional = true }
dioxus-cli-config = { workspace = true }
serde = "1.0.136" serde = "1.0.136"
serde_json = "1.0.79" serde_json = "1.0.79"
+6 -1
View File
@@ -49,7 +49,12 @@ impl Config {
/// Initializes a new `WindowBuilder` with default values. /// Initializes a new `WindowBuilder` with default values.
#[inline] #[inline]
pub fn new() -> Self { 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 { Self {
// event_handler: None, // event_handler: None,