Skip to content

Commit

Permalink
Fix Settings not updating save location
Browse files Browse the repository at this point in the history
  • Loading branch information
pendo324 committed Apr 25, 2020
1 parent 1bfae63 commit 724c76f
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions src/views/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
import { remote } from 'electron';
import { mapState, mapMutations } from 'vuex';
const { dialog } = remote.require('electron');
const { dialog } = remote;
export default {
data() {
Expand Down Expand Up @@ -102,19 +102,18 @@ export default {
clearBrowser() {
this.setBrowser({ browser: null });
},
updateSaveLocation() {
dialog.showOpenDialog(
{
title: 'Save Location',
properties: ['openFile', 'createDirectory', 'promptToCreate'],
defaultPath: this.saveLocation
},
(filePaths, _bookmark) => {
if (typeof filePaths !== 'undefined') {
this.setSaveLocation({ saveLocation: filePaths[0] });
}
async updateSaveLocation() {
const { canceled, filePaths } = await dialog.showOpenDialog({
title: 'Save Location',
properties: ['openFile', 'createDirectory', 'promptToCreate'],
defaultPath: this.saveLocation
});
if (!canceled) {
if (typeof filePaths !== 'undefined') {
this.setSaveLocation({ saveLocation: filePaths[0] });
}
);
}
},
updatePrefix(value) {
if (typeof value !== 'undefined' && value !== null) {
Expand Down

0 comments on commit 724c76f

Please sign in to comment.