fix #14740: fixed backend url per build, key bound to its server
- the backend URL is no longer a setting: one constant per build (release/dev) in src-tauri/src/backend.rs; Settings shows the server read-only; an old backend_url in settings.json is ignored - the stored key records the backend it was created for; a key of another backend is discarded before any use and never stored - a refused key is discarded only if it still is the stored one - the keyring is never called while the settings are locked - one upload per call at a time, also visible after a view switch - opener plugin without its link-click script (it also ran in the remote login page); a login error says to reload the login page Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
+12
-4
@@ -15,12 +15,19 @@ export interface Settings {
|
||||
autostart: boolean
|
||||
start_after_secs: number
|
||||
end_after_secs: number
|
||||
/** The euvino admin backend, e.g. "https://test.euvinopro.eu". */
|
||||
backend_url: string
|
||||
/** Whose backend key is stored; set by the app at login. */
|
||||
backend_username: string | null
|
||||
/** When the stored backend key expires (RFC 3339); set by the app. */
|
||||
backend_key_expires_at: string | null
|
||||
/** The backend the stored key belongs to; set by the app. */
|
||||
backend_key_base_url: string | null
|
||||
}
|
||||
|
||||
/** The backend this build talks to (fixed per build, not a setting). */
|
||||
export interface BackendServer {
|
||||
base_url: string
|
||||
/** Where the admin manages their keys. */
|
||||
keys_url: string
|
||||
}
|
||||
|
||||
/** Login status for the settings, checked with the backend. */
|
||||
@@ -31,8 +38,6 @@ export interface BackendStatus {
|
||||
expires_at: string | null
|
||||
/** `false` if the key could not be checked; username and expiry are then the stored ones. */
|
||||
reachable: boolean
|
||||
/** Where the admin manages their keys. */
|
||||
keys_url: string
|
||||
}
|
||||
|
||||
export type Service = 'deepscript'
|
||||
@@ -115,6 +120,8 @@ export interface CallDetail {
|
||||
/** Renamed speakers by key. */
|
||||
speaker_names: Record<string, string>
|
||||
merges: SpeakerMerge[]
|
||||
/** The transcript is being uploaded right now. */
|
||||
uploading: boolean
|
||||
}
|
||||
|
||||
/** A newer version the release feed offers. */
|
||||
@@ -166,6 +173,7 @@ export const unmergeSpeaker = (id: CallId, fromKey: string) =>
|
||||
/** `null` or an empty title restores the default heading. */
|
||||
export const renameCall = (id: CallId, title: string | null) =>
|
||||
invoke<void>('rename_call', { id, title })
|
||||
export const backendServer = () => invoke<BackendServer>('backend_server')
|
||||
export const backendStatus = () => invoke<BackendStatus>('backend_status')
|
||||
/** Resolves once the login window created a key; rejects if it was closed or failed. */
|
||||
export const backendLogin = () => invoke<void>('backend_login')
|
||||
|
||||
Reference in New Issue
Block a user