✨ Support setting navigation bar title
This commit is contained in:
@@ -15,6 +15,7 @@ pub struct WindowConfig {
|
||||
pub activation_shortcut: String,
|
||||
pub hide_on_close: bool,
|
||||
pub incognito: bool,
|
||||
pub title: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
|
||||
@@ -28,8 +28,14 @@ pub fn set_window(app: &mut App, config: &PakeConfig, tauri_config: &Config) ->
|
||||
serde_json::to_string(&window_config).unwrap()
|
||||
);
|
||||
|
||||
let window_title = window_config
|
||||
.title
|
||||
.as_ref()
|
||||
.map(|t| t.as_str())
|
||||
.unwrap_or("");
|
||||
|
||||
let mut window_builder = WebviewWindowBuilder::new(app, "pake", url)
|
||||
.title("")
|
||||
.title(window_title)
|
||||
.visible(false)
|
||||
.user_agent(user_agent)
|
||||
.resizable(window_config.resizable)
|
||||
|
||||
Reference in New Issue
Block a user