fix(desktop): use opener.openUrl (correct API) instead of non-existent named export 'open'

This commit is contained in:
Esdras Renan 2025-10-10 00:51:49 -03:00
parent cf45e36f32
commit 7685370c05

View file

@ -1,6 +1,6 @@
import { invoke } from "@tauri-apps/api/core"
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 = {
name: string
@ -700,7 +700,7 @@ function redirectToApp(config: AgentConfig) {
}
const url = `${config.appUrl}/machines/handshake?token=${encodeURIComponent(token)}`
try {
await openExternal(url)
await openUrl(url)
setAlert("Abrindo o Sistema de Chamados no navegador padrão…", "success")
} catch {
// fallback: navegar dentro da WebView