mirror of
https://github.com/JustusPlays78/SectorFileUpdater.git
synced 2025-04-29 10:10:57 +00:00
directory select small fix
This commit is contained in:
parent
9e09037955
commit
5a71d336fb
@ -65,8 +65,8 @@ const createWindow = () => {
|
|||||||
ipcMain.on('select-dirs', async(event, arg) => {
|
ipcMain.on('select-dirs', async(event, arg) => {
|
||||||
filepath = await dialog.showOpenDialog(mainWindow, {
|
filepath = await dialog.showOpenDialog(mainWindow, {
|
||||||
properties: ['openDirectory']
|
properties: ['openDirectory']
|
||||||
})
|
});
|
||||||
console.log('directories selected', filepath.filePaths)
|
console.log('directories selected', filepath.filePaths);
|
||||||
mainWindow.webContents.send("filepath", filepath.filePaths);
|
mainWindow.webContents.send("filepath", filepath.filePaths);
|
||||||
// Save directory to file
|
// Save directory to file
|
||||||
});
|
});
|
||||||
|
@ -23,14 +23,12 @@ donwloadBtn.addEventListener('click', (e) => {
|
|||||||
|
|
||||||
let directoryBtn = document.getElementById('dirs');
|
let directoryBtn = document.getElementById('dirs');
|
||||||
directoryBtn.addEventListener('click', (e) => {
|
directoryBtn.addEventListener('click', (e) => {
|
||||||
window.postMessage({
|
ipcRenderer.send('select-dirs');
|
||||||
type: 'select-dirs'
|
});
|
||||||
})
|
ipcRenderer.on("filepath", (event, file) => {
|
||||||
|
document.getElementById('dirBox').value = file;
|
||||||
});
|
});
|
||||||
|
|
||||||
ipcRenderer.on("filepath", (event, file) => {
|
|
||||||
document.getElementById('dirBox').innerText = file;
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// Check update
|
// Check update
|
||||||
|
Loading…
x
Reference in New Issue
Block a user