pake-cli 3.3.1 → 3.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -28,10 +28,17 @@ pub fn set_window(app: &mut App, config: &PakeConfig, tauri_config: &Config) ->
28
28
  serde_json::to_string(&window_config).unwrap()
29
29
  );
30
30
 
31
- let window_title = window_config.title.as_deref().unwrap_or("");
31
+ // Platform-specific title: macOS prefers empty, others fallback to product name
32
+ let effective_title = window_config.title.as_deref().unwrap_or_else(|| {
33
+ if cfg!(target_os = "macos") {
34
+ ""
35
+ } else {
36
+ tauri_config.product_name.as_deref().unwrap_or("")
37
+ }
38
+ });
32
39
 
33
40
  let mut window_builder = WebviewWindowBuilder::new(app, "pake", url)
34
- .title(window_title)
41
+ .title(effective_title)
35
42
  .visible(false)
36
43
  .user_agent(user_agent)
37
44
  .resizable(window_config.resizable)
@@ -44,6 +51,7 @@ pub fn set_window(app: &mut App, config: &PakeConfig, tauri_config: &Config) ->
44
51
  window_builder = window_builder.disable_drag_drop_handler();
45
52
  }
46
53
 
54
+ // Add initialization scripts
47
55
  window_builder = window_builder
48
56
  .initialization_script(&config_script)
49
57
  .initialization_script(include_str!("../inject/component.js"))
@@ -79,24 +87,13 @@ pub fn set_window(app: &mut App, config: &PakeConfig, tauri_config: &Config) ->
79
87
  }
80
88
  }
81
89
 
82
- #[cfg(target_os = "windows")]
90
+ // Windows and Linux share the same configuration
91
+ #[cfg(not(target_os = "macos"))]
83
92
  {
84
93
  window_builder = window_builder
85
94
  .data_directory(_data_dir)
86
- .title(app.package_info().name.clone())
87
- .additional_browser_args("--disable-blink-features=AutomationControlled");
88
-
89
- window_builder = window_builder.theme(None);
90
- }
91
-
92
- #[cfg(target_os = "linux")]
93
- {
94
- window_builder = window_builder
95
- .data_directory(_data_dir)
96
- .title(app.package_info().name.clone())
97
- .additional_browser_args("--disable-blink-features=AutomationControlled");
98
-
99
- window_builder = window_builder.theme(None);
95
+ .additional_browser_args("--disable-blink-features=AutomationControlled")
96
+ .theme(None);
100
97
  }
101
98
 
102
99
  window_builder.build().expect("Failed to build window")