2023-08-28 11:23:10 +00:00
|
|
|
const { ipcRenderer } = require('electron/renderer')
|
2020-08-27 14:31:51 +00:00
|
|
|
|
|
|
|
const selectDirBtn = document.getElementById('select-directory')
|
|
|
|
|
|
|
|
selectDirBtn.addEventListener('click', event => {
|
|
|
|
ipcRenderer.send('open-file-dialog')
|
|
|
|
})
|
|
|
|
|
|
|
|
ipcRenderer.on('selected-directory', (event, path) => {
|
|
|
|
document.getElementById('selected-file').innerHTML = `You selected: ${path}`
|
|
|
|
})
|