mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-24 05:05:39 +00:00
refactor: update browseFiles action to remove default properties and improve file dialog handling (#3957)
--------- Co-authored-by: sanjai0py <sanjailucifer666@gmail.com>
This commit is contained in:
@@ -1039,7 +1039,7 @@ export const browseDirectory = () => (dispatch, getState) => {
|
||||
};
|
||||
|
||||
export const browseFiles =
|
||||
(filters = [], properties = ['multiSelections']) =>
|
||||
(filters, properties) =>
|
||||
(_dispatch, _getState) => {
|
||||
const { ipcRenderer } = window;
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ const browseDirectory = async (win) => {
|
||||
return isDirectory(resolvedPath) ? resolvedPath : false;
|
||||
};
|
||||
|
||||
const browseFiles = async (win, filters, properties) => {
|
||||
const browseFiles = async (win, filters = [], properties = []) => {
|
||||
const { filePaths } = await dialog.showOpenDialog(win, {
|
||||
properties: ['openFile', ...properties],
|
||||
filters
|
||||
|
||||
Reference in New Issue
Block a user