fix(desktop): use opener.openUrl (correct API) instead of non-existent named export 'open'
This commit is contained in:
parent
cf45e36f32
commit
7685370c05
1 changed files with 2 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
import { invoke } from "@tauri-apps/api/core"
|
import { invoke } from "@tauri-apps/api/core"
|
||||||
import { Store } from "@tauri-apps/plugin-store"
|
import { Store } from "@tauri-apps/plugin-store"
|
||||||
import { open as openExternal } from "@tauri-apps/plugin-opener"
|
import { openUrl } from "@tauri-apps/plugin-opener"
|
||||||
|
|
||||||
type MachineOs = {
|
type MachineOs = {
|
||||||
name: string
|
name: string
|
||||||
|
|
@ -700,7 +700,7 @@ function redirectToApp(config: AgentConfig) {
|
||||||
}
|
}
|
||||||
const url = `${config.appUrl}/machines/handshake?token=${encodeURIComponent(token)}`
|
const url = `${config.appUrl}/machines/handshake?token=${encodeURIComponent(token)}`
|
||||||
try {
|
try {
|
||||||
await openExternal(url)
|
await openUrl(url)
|
||||||
setAlert("Abrindo o Sistema de Chamados no navegador padrão…", "success")
|
setAlert("Abrindo o Sistema de Chamados no navegador padrão…", "success")
|
||||||
} catch {
|
} catch {
|
||||||
// fallback: navegar dentro da WebView
|
// fallback: navegar dentro da WebView
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue