- {browsers}
+ {
+ this.props.browserNames.map((name, i) => {
+ return
+ })
+ }
-
+
@@ -167,10 +151,10 @@ class ImportBrowserDataPanel extends ImmutableComponent {
}
}
+module.exports = ReduxComponent.connect(ImportBrowserDataPanel)
+
const styles = StyleSheet.create({
dropdownWrapper: {
marginBottom: `calc(${globalStyles.spacing.dialogInsideMargin} / 2)`
}
})
-
-module.exports = ImportBrowserDataPanel
diff --git a/app/renderer/components/main/main.js b/app/renderer/components/main/main.js
index cdbe739aaa1..147213928ac 100644
--- a/app/renderer/components/main/main.js
+++ b/app/renderer/components/main/main.js
@@ -77,7 +77,6 @@ class Main extends ImmutableComponent {
this.onHideSiteInfo = this.onHideSiteInfo.bind(this)
this.onHideBraveryPanel = this.onHideBraveryPanel.bind(this)
this.onHideClearBrowsingDataPanel = this.onHideClearBrowsingDataPanel.bind(this)
- this.onHideImportBrowserDataPanel = this.onHideImportBrowserDataPanel.bind(this)
this.onHideWidevinePanel = this.onHideWidevinePanel.bind(this)
this.onHideAutofillAddressPanel = this.onHideAutofillAddressPanel.bind(this)
this.onHideAutofillCreditCardPanel = this.onHideAutofillCreditCardPanel.bind(this)
@@ -453,7 +452,7 @@ class Main extends ImmutableComponent {
ipc.on(messages.IMPORTER_LIST, (e, detail) => {
windowActions.setImportBrowserDataDetail(detail)
- windowActions.setImportBrowserDataSelected({})
+ windowActions.setImportBrowserDataSelected()
})
// DO NOT ADD TO THIS LIST - see above
@@ -541,10 +540,6 @@ class Main extends ImmutableComponent {
windowActions.setClearBrowsingDataPanelVisible(false)
}
- onHideImportBrowserDataPanel () {
- windowActions.setImportBrowserDataDetail()
- }
-
onHideWidevinePanel () {
windowActions.widevinePanelDetailChanged({
shown: false
@@ -743,10 +738,7 @@ class Main extends ImmutableComponent {
}
{
importBrowserDataPanelIsVisible
- ?
+ ?
: null
}
{
diff --git a/js/stores/windowStore.js b/js/stores/windowStore.js
index d4a24f5fcf8..c22231302b4 100644
--- a/js/stores/windowStore.js
+++ b/js/stores/windowStore.js
@@ -529,6 +529,7 @@ const doAction = (action) => {
case windowConstants.WINDOW_SET_CLEAR_BROWSING_DATA_VISIBLE:
windowState = windowState.setIn(['ui', 'isClearBrowsingDataPanelVisible'], action.isVisible)
break
+
case windowConstants.WINDOW_SET_IMPORT_BROWSER_DATA_DETAIL:
if (!action.importBrowserDataDetail) {
windowState = windowState.delete('importBrowserDataDetail')
@@ -537,10 +538,17 @@ const doAction = (action) => {
}
break
case windowConstants.WINDOW_SET_IMPORT_BROWSER_DATA_SELECTED:
- if (!action.selected) {
+ if (action.selected == null) {
windowState = windowState.delete('importBrowserDataSelected')
} else {
- windowState = windowState.set('importBrowserDataSelected', Immutable.fromJS(action.selected))
+ if (typeof action.selected === 'number') {
+ const detail = windowState.getIn(['importBrowserDataDetail', action.selected])
+ windowState = windowState.set('importBrowserDataSelected', detail)
+ } else {
+ action.selected.forEach((value, key) => {
+ windowState = windowState.setIn(['importBrowserDataSelected', key], value)
+ })
+ }
}
break
case windowConstants.WINDOW_WIDEVINE_PANEL_DETAIL_CHANGED: