feat(window): restart app on system titlebar toggle

Since the window must be created with the correct decoration state
(runtime toggling doesn't work on Linux/Wayland), persist the setting
to the Rust backend and restart the app immediately.

Add restart_app Tauri command using AppHandle::restart(). Update i18n
descriptions to inform the user the app will restart.
This commit is contained in:
vicrodh committed 2026-02-09 13:36:57 -06:00
1 parent dec620ee4f
commit c88974c468
6 files changed
+25 -19

No files matched your search

+8
View File
@@ -140,6 +140,12 @@ pub fn update_media_controls_metadata(
}
#[cfg_attr(mobile, tauri::mobile_entry_point)]
#[tauri::command]
fn restart_app(app: tauri::AppHandle) {
log::info!("App restart requested by user");
app.restart();
}
pub fn run() {
// Load .env file if present (for development)
// Silently ignore if not found (production builds use compile-time env vars)
@@ -982,6 +988,8 @@ pub fn run() {
// Window settings commands
config::window_settings::get_window_settings,
config::window_settings::set_use_system_titlebar,
// App lifecycle commands
restart_app,
// Log capture commands
logging::get_backend_logs,
logging::upload_logs_to_paste,