feat: refactor openExternalUrl to use dedicated Tauri shell utility
This commit is contained in:
9
src/app/utils/tauriShell.ts
Normal file
9
src/app/utils/tauriShell.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
* Tauri shell open utility, only imported in Tauri builds
|
||||
*/
|
||||
|
||||
export async function openWithTauriShell(url: string): Promise<void> {
|
||||
// @ts-ignore
|
||||
const { open } = await import(/* @vite-ignore */ '@tauri-apps/plugin-shell');
|
||||
await open(url);
|
||||
}
|
||||
Reference in New Issue
Block a user