1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-06-05 21:59:22 +02:00

feat: open,save, and save as file in query tab

This commit is contained in:
bagusindrayana
2024-04-06 15:34:42 +08:00
parent f7204dc0ae
commit c1e58eb695
5 changed files with 188 additions and 18 deletions

View File

@@ -8,6 +8,10 @@ export default class {
return ipcRenderer.invoke('show-open-dialog', unproxify(options));
}
static showSaveDialog (options: OpenDialogOptions): Promise<OpenDialogReturnValue> {
return ipcRenderer.invoke('show-save-dialog', unproxify(options));
}
static getDownloadPathDirectory (): Promise<string> {
return ipcRenderer.invoke('get-download-dir-path');
}
@@ -27,4 +31,12 @@ export default class {
static unregisterShortcuts () {
return ipcRenderer.invoke('unregister-shortcuts');
}
static readFile (path: string): Promise<string> {
return ipcRenderer.invoke('read-file', path);
}
static writeFile (path: string, content:any) {
return ipcRenderer.invoke('write-file', path, content);
}
}