From 7618a3cb618708697573c69342f5e8624429f7aa Mon Sep 17 00:00:00 2001 From: Evan Waldmann Date: Tue, 15 Mar 2022 22:16:34 -0700 Subject: [PATCH] adding file filters to save --- desktop/sources/scripts/project.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/desktop/sources/scripts/project.js b/desktop/sources/scripts/project.js index c95e7c2..00be778 100644 --- a/desktop/sources/scripts/project.js +++ b/desktop/sources/scripts/project.js @@ -117,7 +117,11 @@ function Project () { console.log('Save As Page') const page = this.page() - const path = dialog.showSaveDialogSync(app.win) + const path = dialog.showSaveDialogSync(app.win, { + filters: [ + { name: 'Text Documents (*.txt)', extensions: ['txt'] }, + { name: 'All Files', extensions: ['*'] }] + }) if (!path) { console.log('Nothing to save'); return }