More tauri removal

This commit is contained in:
49lf
2024-07-31 15:19:13 -04:00
parent f566cd673b
commit b330972d3b
2 changed files with 2 additions and 5 deletions

View File

@ -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",

View File

@ -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.