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

change import dialog switch default from OFF to ON for available data types #4192

Merged
merged 1 commit into from
Sep 22, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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