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