export feature should now work properly

This commit is contained in:
04041b 2024-12-31 09:43:01 -08:00
parent c6b8fbca55
commit 01452c57f5
2 changed files with 4 additions and 4 deletions

6
app/global.d.ts vendored
View File

@ -15,9 +15,6 @@ declare interface Window {
core: {
writeText(text: string): Promise<void>;
invoke(command: string, payload?: Record<string, unknown>): Promise<any>;
dialog: {
save(options?: Record<string, unknown>): Promise<string | null>;
};
fs: {
writeBinaryFile(path: string, data: Uint8Array): Promise<void>;
writeTextFile(path: string, data: string): Promise<void>;
@ -41,5 +38,8 @@ declare interface Window {
): Promise<Response<T>>;
};
};
dialog: {
save(options?: Record<string, unknown>): Promise<string | null>;
};
};
}

View File

@ -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: [
{