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

Commit 48a8169

Browse files
authored
Merge pull request #9433 from evq/feature/password-import
Enable importing passwords from Firefox
2 parents 13984b0 + baf8125 commit 48a8169

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

app/importer.js

-3
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,6 @@ importer.on('update-supported-browsers', (e, detail) => {
6969
}
7070
})
7171

72-
importer.on('add-password-form', (e, detail) => {
73-
})
74-
7572
importer.on('add-history-page', (e, history, visitSource) => {
7673
let sites = []
7774
for (let i = 0; i < history.length; ++i) {

app/renderer/components/main/importBrowserDataPanel.js

+11
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class ImportBrowserDataPanel extends React.Component {
3333
this.onToggleHistory = this.onToggleSetting.bind(this, 'history')
3434
this.onToggleFavorites = this.onToggleSetting.bind(this, 'favorites')
3535
this.onToggleCookies = this.onToggleSetting.bind(this, 'cookies')
36+
this.onTogglePasswords = this.onToggleSetting.bind(this, 'passwords')
3637
this.onImport = this.onImport.bind(this)
3738
this.onChange = this.onChange.bind(this)
3839
}
@@ -50,6 +51,7 @@ class ImportBrowserDataPanel extends React.Component {
5051
data.favorites = this.props.favorites
5152
data.history = this.props.history
5253
data.type = this.props.type
54+
data.passwords = this.props.passwords
5355

5456
appActions.importBrowserData(Immutable.fromJS(data))
5557
this.onHide()
@@ -83,11 +85,13 @@ class ImportBrowserDataPanel extends React.Component {
8385
props.isSupportingHistory = currentSelectedBrowser.get('history', false)
8486
props.isSupportingFavorites = currentSelectedBrowser.get('favorites', false)
8587
props.isSupportingCookies = currentSelectedBrowser.get('cookies', false)
88+
props.isSupportingPasswords = currentSelectedBrowser.get('passwords', false)
8689
props.currentIndex = index
8790
props.cookies = importBrowserDataSelected.get('cookies')
8891
props.favorites = importBrowserDataSelected.get('favorites')
8992
props.history = importBrowserDataSelected.get('history')
9093
props.type = importBrowserDataSelected.get('type')
94+
props.passwords = importBrowserDataSelected.get('passwords')
9195

9296
// used in other functions
9397
props.selectedIndex = importBrowserDataSelected.get('index')
@@ -132,6 +136,13 @@ class ImportBrowserDataPanel extends React.Component {
132136
onClick={this.onToggleCookies}
133137
disabled={!this.props.isSupportingCookies}
134138
/>
139+
<SwitchControl
140+
rightl10nId='savedPasswords'
141+
checkedOn={this.props.passwords}
142+
onClick={this.onTogglePasswords}
143+
disabled={!this.props.isSupportingPasswords}
144+
/>
145+
135146
</CommonFormSection>
136147
<CommonFormSection>
137148
<div data-l10n-id='importDataCloseBrowserWarning' />

0 commit comments

Comments
 (0)