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

Enable importing passwords from Firefox #9433

Merged
merged 1 commit into from
Jun 27, 2017
Merged
Show file tree
Hide file tree
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
3 changes: 0 additions & 3 deletions app/importer.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ importer.on('update-supported-browsers', (e, detail) => {
}
})

importer.on('add-password-form', (e, detail) => {
})

importer.on('add-history-page', (e, history, visitSource) => {
let sites = []
for (let i = 0; i < history.length; ++i) {
Expand Down
11 changes: 11 additions & 0 deletions app/renderer/components/main/importBrowserDataPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class ImportBrowserDataPanel extends React.Component {
this.onToggleHistory = this.onToggleSetting.bind(this, 'history')
this.onToggleFavorites = this.onToggleSetting.bind(this, 'favorites')
this.onToggleCookies = this.onToggleSetting.bind(this, 'cookies')
this.onTogglePasswords = this.onToggleSetting.bind(this, 'passwords')
this.onImport = this.onImport.bind(this)
this.onChange = this.onChange.bind(this)
}
Expand All @@ -50,6 +51,7 @@ class ImportBrowserDataPanel extends React.Component {
data.favorites = this.props.favorites
data.history = this.props.history
data.type = this.props.type
data.passwords = this.props.passwords

appActions.importBrowserData(Immutable.fromJS(data))
this.onHide()
Expand Down Expand Up @@ -83,11 +85,13 @@ class ImportBrowserDataPanel extends React.Component {
props.isSupportingHistory = currentSelectedBrowser.get('history', false)
props.isSupportingFavorites = currentSelectedBrowser.get('favorites', false)
props.isSupportingCookies = currentSelectedBrowser.get('cookies', false)
props.isSupportingPasswords = currentSelectedBrowser.get('passwords', false)
props.currentIndex = index
props.cookies = importBrowserDataSelected.get('cookies')
props.favorites = importBrowserDataSelected.get('favorites')
props.history = importBrowserDataSelected.get('history')
props.type = importBrowserDataSelected.get('type')
props.passwords = importBrowserDataSelected.get('passwords')

// used in other functions
props.selectedIndex = importBrowserDataSelected.get('index')
Expand Down Expand Up @@ -132,6 +136,13 @@ class ImportBrowserDataPanel extends React.Component {
onClick={this.onToggleCookies}
disabled={!this.props.isSupportingCookies}
/>
<SwitchControl
rightl10nId='savedPasswords'
checkedOn={this.props.passwords}
onClick={this.onTogglePasswords}
disabled={!this.props.isSupportingPasswords}
/>

</CommonFormSection>
<CommonFormSection>
<div data-l10n-id='importDataCloseBrowserWarning' />
Expand Down