|
|
@@ -189,6 +189,13 @@ pub fn run() {
|
|
|
let updater_enabled = option_env!("TAURI_SIGNING_PRIVATE_KEY").is_some();
|
|
|
|
|
|
let mut builder = tauri::Builder::default()
|
|
|
+ .plugin(tauri_plugin_single_instance::init(|app, _args, _cwd| {
|
|
|
+ // Focus existing window when another instance is launched
|
|
|
+ if let Some(window) = app.get_webview_window("main") {
|
|
|
+ let _ = window.set_focus();
|
|
|
+ let _ = window.unminimize();
|
|
|
+ }
|
|
|
+ }))
|
|
|
.plugin(tauri_plugin_os::init())
|
|
|
.plugin(tauri_plugin_window_state::Builder::new().build())
|
|
|
.plugin(tauri_plugin_store::Builder::new().build())
|