diff --git a/app/global.d.ts b/app/global.d.ts index b83f61993..f3f97aede 100644 --- a/app/global.d.ts +++ b/app/global.d.ts @@ -15,9 +15,6 @@ declare interface Window { core: { writeText(text: string): Promise; invoke(command: string, payload?: Record): Promise; - dialog: { - save(options?: Record): Promise; - }; fs: { writeBinaryFile(path: string, data: Uint8Array): Promise; writeTextFile(path: string, data: string): Promise; @@ -41,5 +38,8 @@ declare interface Window { ): Promise>; }; }; + dialog: { + save(options?: Record): Promise; + }; }; } diff --git a/app/utils.ts b/app/utils.ts index 7f5fceaf0..20148bf27 100644 --- a/app/utils.ts +++ b/app/utils.ts @@ -45,7 +45,7 @@ export async function copyToClipboard(text: string) { export async function downloadAs(text: string, filename: string) { if (window.__TAURI__) { - const result = await window.__TAURI__.core.dialog.save({ + const result = await window.__TAURI__.dialog.save({ defaultPath: `${filename}`, filters: [ {