mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 04:26:01 +00:00
removed dependencies on electron remote
This commit is contained in:
@@ -11,10 +11,10 @@
|
||||
|
||||
const { values, setFieldValue } = getFormContext();
|
||||
|
||||
function handleBrowse() {
|
||||
async function handleBrowse() {
|
||||
const electron = getElectron();
|
||||
if (!electron) return;
|
||||
const filePaths = electron.remote.dialog.showOpenDialogSync(electron.remote.getCurrentWindow(), {
|
||||
const filePaths = await electron.showOpenDialog({
|
||||
defaultPath: values[name],
|
||||
properties: ['showHiddenFiles'],
|
||||
filters: [{ name: 'All Files', extensions: ['*'] }],
|
||||
|
||||
Reference in New Issue
Block a user