Skip to content

Commit

Permalink
Fix: always-on-top setting (#3347)
Browse files Browse the repository at this point in the history
* fix: always-on-top

* revision: remove setting override
  • Loading branch information
DogeDark authored Jan 21, 2025
1 parent d342630 commit 4342ca9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/cli/src/serve/handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,19 @@ impl AppHandle {
start_fullstack_on_address: Option<SocketAddr>,
open_browser: bool,
) -> Result<()> {
let krate = &self.app.build.krate;

// Set the env vars that the clients will expect
// These need to be stable within a release version (ie 0.6.0)
let mut envs = vec![
(dioxus_cli_config::CLI_ENABLED_ENV, "true".to_string()),
(
dioxus_cli_config::ALWAYS_ON_TOP_ENV,
krate.settings.always_on_top.unwrap_or(true).to_string(),
),
(
dioxus_cli_config::APP_TITLE_ENV,
self.app.build.krate.config.web.app.title.clone(),
krate.config.web.app.title.clone(),
),
("RUST_BACKTRACE", "1".to_string()),
(
Expand All @@ -97,7 +103,7 @@ impl AppHandle {
),
];

if let Some(base_path) = &self.app.build.krate.config.web.app.base_path {
if let Some(base_path) = &krate.config.web.app.base_path {
envs.push((dioxus_cli_config::ASSET_ROOT_ENV, base_path.clone()));
}

Expand Down

0 comments on commit 4342ca9

Please sign in to comment.