Simplify cli-config, hotreload -> devtools (drop to 0 deps, fast compile times) (#2975)
* simplify cli-config crate * clean up configs * add devtools crate, update cargo imports * fix serve addr, fix websocket proxy issue * add comment about opt profiles * rename hot-reload to devtools
This commit is contained in:
1 parent
8203ee571f
commit
3fb1f739d1
58 files changed
+1131
-1654
No files matched your search
@@ -65,18 +65,12 @@ impl Config {
|
||||
/// Initializes a new `WindowBuilder` with default values.
|
||||
#[inline]
|
||||
pub fn new() -> Self {
|
||||
let dioxus_config = dioxus_cli_config::CURRENT_CONFIG.as_ref();
|
||||
|
||||
let mut window: WindowBuilder = WindowBuilder::new().with_title(
|
||||
dioxus_config
|
||||
.map(|c| c.application.name.clone())
|
||||
.unwrap_or("Dioxus App".to_string()),
|
||||
);
|
||||
let mut window: WindowBuilder = WindowBuilder::new()
|
||||
.with_title(dioxus_cli_config::app_title().unwrap_or_else(|| "Dioxus App".to_string()));
|
||||
|
||||
// During development we want the window to be on top so we can see it while we work
|
||||
let always_on_top = dioxus_config
|
||||
.map(|c| c.desktop.always_on_top)
|
||||
.unwrap_or(true);
|
||||
let always_on_top = dioxus_cli_config::always_on_top().unwrap_or(true);
|
||||
|
||||
if cfg!(debug_assertions) {
|
||||
window = window.with_always_on_top(always_on_top);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user