feat #14740: link to the euvino admin backend

- Settings section "Backend": backend URL, login status checked live
  (logged in as / until, not logged in, backend unreachable), Anmelden /
  Neu anmelden, Abmelden and the link to the key management page
- login window "backend-login": the backend's own login page in an
  incognito webview without any Tauri capability; after a page load
  behind the login, its cookies create a key (one request, never stored
  or logged), the key goes to the keyring, the window closes; closing it
  cancels; one login at a time, later requests wait for the same result
- call detail: "Transkript hochladen" / "Erneut hochladen" (with a
  confirmation), "wird hochgeladen…", "Hochgeladen am … (ID …)" and
  inline errors; logs in first when there is no usable key
- saving a different backend URL discards the key of the old backend

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
hauke
2026-11-06 14:54:38 +01:00
co-authored by Claude Opus 5.5
parent 58e96a2954
commit f045424e97
10 changed files with 990 additions and 29 deletions
+16 -9
View File
@@ -37,16 +37,23 @@ pub fn get_settings(state: State<'_, AppState>) -> Settings {
state.settings()
}
/// Saves the settings. A changed backend URL ends the backend login
/// (`backend-changed`). May delete from the keyring, so it runs on the
/// blocking pool.
#[tauri::command]
pub fn save_settings(
app: AppHandle,
state: State<'_, AppState>,
settings: Settings,
) -> CmdResult<()> {
let autostart = settings.autostart;
state.save_settings(settings)?;
apply_autostart(&app, autostart);
Ok(())
pub async fn save_settings(app: AppHandle, settings: Settings) -> CmdResult<()> {
blocking(app, move |app| {
let autostart = settings.autostart;
let backend_changed = app.state::<AppState>().save_settings(settings)?;
apply_autostart(app, autostart);
if backend_changed {
if let Err(e) = app.emit_to("main", "backend-changed", ()) {
log::error!("could not emit backend-changed: {e}");
}
}
Ok(())
})
.await
}
/// Stores `key` in the keyring; an empty key deletes the entry.