diff --git a/package.json b/package.json index b784fa52d..703454439 100644 --- a/package.json +++ b/package.json @@ -124,7 +124,6 @@ "@iarna/toml": "^2.2.5", "@lezer/generator": "^1.7.1", "@playwright/test": "^1.45.1", - "@tauri-apps/cli": "==2.0.0-beta.13", "@testing-library/jest-dom": "^5.14.1", "@testing-library/react": "^15.0.2", "@types/d3-force": "^3.0.10", diff --git a/src/lib/exportSave.ts b/src/lib/exportSave.ts index f402eef53..4d0ff0733 100644 --- a/src/lib/exportSave.ts +++ b/src/lib/exportSave.ts @@ -1,8 +1,6 @@ import { isDesktop } from './isDesktop' import { deserialize_files } from '../wasm-lib/pkg/wasm_lib' import { browserSaveFile } from './browserSaveFile' -import { save } from '@tauri-apps/plugin-dialog' -import { writeFile } from '@tauri-apps/plugin-fs' import JSZip from 'jszip' import ModelingAppFile from './modelingAppFile' @@ -17,7 +15,7 @@ const save_ = async (file: ModelingAppFile) => { } // Open a dialog to save the file. - const filePath = await save({ + const filePath = await window.electron.save({ defaultPath: file.name, filters: [ { @@ -34,7 +32,7 @@ const save_ = async (file: ModelingAppFile) => { } // Write the file. - await writeFile(filePath, new Uint8Array(file.contents)) + await window.electron.writeFile(filePath, new Uint8Array(file.contents)) } else { // Download the file to the user's computer. // Now we need to download the files to the user's downloads folder.