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

+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,