diff --git a/src/renderer/components/download-settings/download-settings.js b/src/renderer/components/download-settings/download-settings.js index 96c67535..7192cd68 100644 --- a/src/renderer/components/download-settings/download-settings.js +++ b/src/renderer/components/download-settings/download-settings.js @@ -1,6 +1,7 @@ import Vue from 'vue' import FtFlexBox from '../ft-flex-box/ft-flex-box.vue' import FtToggleSwitch from '../ft-toggle-switch/ft-toggle-switch.vue' +import FtSelect from '../ft-select/ft-select.vue' import FtButton from '../ft-button/ft-button.vue' import FtInput from '../ft-input/ft-input.vue' import { mapActions } from 'vuex' @@ -12,19 +13,36 @@ export default Vue.extend({ components: { 'ft-toggle-switch': FtToggleSwitch, 'ft-flex-box': FtFlexBox, + 'ft-select': FtSelect, 'ft-button': FtButton, 'ft-input': FtInput }, data: function () { return { - askForDownloadPath: this.$store.getters.getDownloadFolderPath === '' + askForDownloadPath: false, + downloadBehaviorValues: [ + 'download', + 'open' + ] } }, computed: { downloadPath: function() { return this.$store.getters.getDownloadFolderPath + }, + downloadBehaviorNames: function () { + return [ + this.$t('Settings.Download Settings.Download in app'), + this.$t('Settings.Download Settings.Open in web browser') + ] + }, + downloadBehavior: function () { + return this.$store.getters.getDownloadBehavior } }, + mounted: function () { + this.askForDownloadPath = this.downloadPath === '' + }, methods: { handleDownloadingSettingChange: function (value) { this.askForDownloadPath = value @@ -42,7 +60,8 @@ export default Vue.extend({ this.updateDownloadFolderPath(folder.filePaths[0]) }, ...mapActions([ - 'updateDownloadFolderPath' + 'updateDownloadFolderPath', + 'updateDownloadBehavior' ]) } diff --git a/src/renderer/components/download-settings/download-settings.vue b/src/renderer/components/download-settings/download-settings.vue index fe158265..3cd274bf 100644 --- a/src/renderer/components/download-settings/download-settings.vue +++ b/src/renderer/components/download-settings/download-settings.vue @@ -6,7 +6,19 @@
- + + + +