Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Merge pull request #4192 from darkdh/4187
Browse files Browse the repository at this point in the history
change import dialog switch default from OFF to ON for available data types
  • Loading branch information
bbondy authored Sep 22, 2016
2 parents 71f4ebe + fefe0c1 commit 0dd1bd7
Showing 1 changed file with 30 additions and 2 deletions.
32 changes: 30 additions & 2 deletions app/renderer/components/importBrowserDataPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,39 @@ class ImportBrowserDataPanel extends ImmutableComponent {
this.props.onHide()
}
onChange (e) {
windowActions.setImportBrowserDataSelected(
this.props.importBrowserDataSelected.set('index', e.target.value))
this.props.importBrowserDataSelected = this.props.importBrowserDataSelected.set('index', e.target.value)
this.props.importBrowserDataSelected = this.props.importBrowserDataSelected.set('history', false)
this.props.importBrowserDataSelected = this.props.importBrowserDataSelected.set('favorites', false)
this.props.importBrowserDataSelected = this.props.importBrowserDataSelected.set('mergeFavorites', false)
this.props.importBrowserDataSelected = this.props.importBrowserDataSelected.set('cookies', false)
let importBrowserDataSelected = this.props.importBrowserDataSelected
if (this.supportHistory) {
importBrowserDataSelected = importBrowserDataSelected.set('history', true)
}
if (this.supportFavorites) {
importBrowserDataSelected = importBrowserDataSelected.set('favorites', true)
importBrowserDataSelected = importBrowserDataSelected.set('mergeFavorites', true)
}
if (this.supportCookies) {
importBrowserDataSelected = importBrowserDataSelected.set('cookies', true)
}
windowActions.setImportBrowserDataSelected(importBrowserDataSelected)
}
get selectedBrowser () {
let index = this.props.importBrowserDataSelected.get('index')
if (index === undefined) {
this.props.importBrowserDataSelected = this.props.importBrowserDataSelected.set('index', '0')
if (this.supportHistory) {
this.props.importBrowserDataSelected = this.props.importBrowserDataSelected.set('history', true)
}
if (this.supportFavorites) {
this.props.importBrowserDataSelected = this.props.importBrowserDataSelected.set('favorites', true)
this.props.importBrowserDataSelected = this.props.importBrowserDataSelected.set('mergeFavorites', true)
}
if (this.supportCookies) {
this.props.importBrowserDataSelected = this.props.importBrowserDataSelected.set('cookies', true)
}
}
return index !== undefined ? index : '0'
}
render () {
Expand Down

0 comments on commit 0dd1bd7

Please sign in to comment.