mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-09-30 15:16:38 +08:00
export feature should now work properly
This commit is contained in:
parent
c6b8fbca55
commit
01452c57f5
6
app/global.d.ts
vendored
6
app/global.d.ts
vendored
@ -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>;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -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: [
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user