feat(titlebar): make custom title bar optional via Settings toggle

- New authStore field useCustomTitlebar (default: true)
- set_window_decorations Tauri command toggles native decorations at runtime
- Settings toggle visible only on Linux (no restart required)
- i18n keys added to EN + DE

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Psychotoxical
2026-04-07 21:47:29 +02:00
parent d49137475f
commit 45fa606ae1
7 changed files with 43 additions and 2 deletions
+9
View File
@@ -36,6 +36,14 @@ fn exit_app(app_handle: tauri::AppHandle) {
app_handle.exit(0);
}
/// Toggle native window decorations at runtime (Linux custom title bar opt-out).
#[tauri::command]
fn set_window_decorations(enabled: bool, app_handle: tauri::AppHandle) {
if let Some(win) = app_handle.get_webview_window("main") {
let _ = win.set_decorations(enabled);
}
}
/// Authenticate with Navidrome's own REST API and return a Bearer token.
async fn navidrome_token(server_url: &str, username: &str, password: &str) -> Result<String, String> {
@@ -962,6 +970,7 @@ pub fn run() {
.invoke_handler(tauri::generate_handler![
greet,
exit_app,
set_window_decorations,
register_global_shortcut,
unregister_global_shortcut,
mpris_set_metadata,