chore: move window.open to platform io to handle desktop app

This commit is contained in:
Andrew Bastin
2023-12-19 11:26:37 +05:30
parent f28298afe7
commit 5ad8f6c2ce
6 changed files with 21 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
import { IOPlatformDef } from "@hoppscotch/common/platform/io"
import { save } from "@tauri-apps/api/dialog"
import { open } from "@tauri-apps/api/shell"
import { writeBinaryFile, writeTextFile } from "@tauri-apps/api/fs"
export const ioDef: IOPlatformDef = {
@@ -21,4 +22,7 @@ export const ioDef: IOPlatformDef = {
return { type: "saved", path }
},
openExternalLink(url) {
return open(url)
},
}