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:
+16
-3
@@ -1,3 +1,4 @@
|
||||
mod backend;
|
||||
mod commands;
|
||||
mod detection;
|
||||
mod processing;
|
||||
@@ -34,6 +35,9 @@ pub fn run() {
|
||||
))
|
||||
.plugin(tauri_plugin_notification::init())
|
||||
.plugin(tauri_plugin_updater::Builder::new().build())
|
||||
// Only for `open_backend_keys_page`: no capability grants the UI
|
||||
// the plugin's commands.
|
||||
.plugin(tauri_plugin_opener::init())
|
||||
.setup(|app| {
|
||||
// Release builds log to a file in the app log directory (on
|
||||
// Windows %LOCALAPPDATA%\eu.euvino.callrecorder\logs), debug
|
||||
@@ -89,6 +93,7 @@ pub fn run() {
|
||||
processing::clear_upload_dir(app.handle());
|
||||
app.manage(state);
|
||||
app.manage(PendingUpdate::default());
|
||||
app.manage(backend::LoginWaiters::default());
|
||||
// Windows are created here (`create: false` in tauri.conf.json)
|
||||
// instead of by Tauri before `setup` runs: their webviews load
|
||||
// immediately and invoke commands (list_calls, get_recording_state,
|
||||
@@ -110,10 +115,13 @@ pub fn run() {
|
||||
})
|
||||
.on_window_event(|window, event| {
|
||||
// Closing a window only hides it; the app keeps running in the
|
||||
// tray (for call detection) until "Beenden".
|
||||
// tray (for call detection) until "Beenden". The login window
|
||||
// really closes: that cancels the login.
|
||||
if let WindowEvent::CloseRequested { api, .. } = event {
|
||||
api.prevent_close();
|
||||
let _ = window.hide();
|
||||
if window.label() != backend::LOGIN_WINDOW {
|
||||
api.prevent_close();
|
||||
let _ = window.hide();
|
||||
}
|
||||
}
|
||||
})
|
||||
.invoke_handler(tauri::generate_handler![
|
||||
@@ -139,6 +147,11 @@ pub fn run() {
|
||||
commands::merge_speakers,
|
||||
commands::unmerge_speaker,
|
||||
commands::rename_call,
|
||||
backend::backend_status,
|
||||
backend::backend_login,
|
||||
backend::backend_logout,
|
||||
backend::open_backend_keys_page,
|
||||
backend::upload_transcript,
|
||||
updater::get_update,
|
||||
updater::install_update,
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user