Bläddra i källkod

Fix: `always-on-top` setting (#3347)

* fix: always-on-top

* revision: remove setting override
Miles Murgaw 5 månader sedan
förälder
incheckning
4342ca92a3
1 ändrade filer med 8 tillägg och 2 borttagningar
  1. 8 2
      packages/cli/src/serve/handle.rs

+ 8 - 2
packages/cli/src/serve/handle.rs

@@ -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()),
             (
@@ -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()));
         }