fix: update openExternalUrl to use Tauri plugin shell for improved URL handling

This commit is contained in:
2026-01-24 08:15:49 +11:00
parent 92be07cb47
commit 455cf5cce6

View File

@@ -5,8 +5,9 @@
export const openExternalUrl = async (url: string): Promise<void> => {
if (typeof window !== 'undefined' && (window as any).__TAURI__) {
try {
const { openWithTauriShell } = await import('./tauriShell');
await openWithTauriShell(url);
// @ts-ignore
const { open } = await import(/* @vite-ignore */ '@tauri-apps/plugin-shell');
await open(url);
return;
} catch (err) {
console.warn('Tauri shell.open failed, falling back to window.open:', err);