From a8ea31124dea04191e237cba17937cf61c91733a Mon Sep 17 00:00:00 2001 From: Simon Davy Date: Tue, 17 Oct 2023 16:22:08 +0100 Subject: [PATCH] Fix File dialog to match --- sacro-app/src/main-menu.js | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/sacro-app/src/main-menu.js b/sacro-app/src/main-menu.js index 595b3eff..92f4a626 100644 --- a/sacro-app/src/main-menu.js +++ b/sacro-app/src/main-menu.js @@ -12,25 +12,21 @@ const mainMenu = (serverUrl) => { label: "File", submenu: [ { - label: "Open File", + label: "Open Directory", accelerator: "CommandOrControl+O", click: async () => { dialog .showOpenDialog({ - title: "Choose ACRO outputs json file", - properties: ["openFile"], + title: "Choose directory containing outputs you wish to review", + properties: ["openDirectory"], defaultPath: os.homedir(), - filters: [ - { name: "ACRO Outputs", extensions: ["json", "acro"] }, - { name: "All files", extensions: ["*"] }, - ], }) .then((result) => { if (!result.canceled) { const qs = querystring.stringify({ - path: result.filePaths[0], + dirpath: result.filePaths[0], }); - const url = `${serverUrl}?${qs}`; + const url = `${serverUrl}/load?${qs}`; BrowserWindow.getFocusedWindow().loadURL(url); } })