electron-205: started with a basic implementation of the feature

This commit is contained in:
Vishwas Shashidhar
2017-11-09 19:01:10 +05:30
parent cd702ab2c3
commit 7779f0ff1d

View File

@@ -65,12 +65,25 @@ const template = [{
}
},
{
label: 'Open Crashes Directory',
label: 'Set Downloads Directory',
click() {
const crashesDirectory = electron.crashReporter.getCrashesDirectory() + '/completed';
electron.shell.showItemInFolder(crashesDirectory);
electron.dialog.showOpenDialog({
title: 'Select Downloads Directory',
defaultPath: '~/Downloads',
buttonLabel: 'Select',
properties: ['openDirectory', 'createDirectory']
}, (filePaths) => {
updateConfigField('downloadsDirectory', filePaths[0]);
})
}
},
{
label: 'Open Crashes Directory',
click() {
const crashesDirectory = electron.crashReporter.getCrashesDirectory() + '/completed';
electron.shell.showItemInFolder(crashesDirectory);
}
},
{
type: 'separator'
},