mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 23:03:32 +00:00
importer instructions
This commit is contained in:
@@ -11,20 +11,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch (source) {
|
switch (source) {
|
||||||
case 'local':
|
case 'bitwardencsv':
|
||||||
importLocal(file, success, error);
|
importBitwardenCsv(file, success, error);
|
||||||
break;
|
break;
|
||||||
case 'lastpass':
|
case 'lastpass':
|
||||||
importLastPass(file, success, error);
|
importLastPass(file, success, error);
|
||||||
break;
|
break;
|
||||||
case 'safeincloudcsv':
|
|
||||||
importSafeInCloudCsv(file, success, error);
|
|
||||||
break;
|
|
||||||
case 'safeincloudxml':
|
case 'safeincloudxml':
|
||||||
importSafeInCloudXml(file, success, error);
|
importSafeInCloudXml(file, success, error);
|
||||||
break;
|
break;
|
||||||
case 'keepassxml':
|
case 'keepass2xml':
|
||||||
importKeePassXml(file, success, error);
|
importKeePass2Xml(file, success, error);
|
||||||
break;
|
break;
|
||||||
case 'keepassxcsv':
|
case 'keepassxcsv':
|
||||||
importKeePassXCsv(file, success, error);
|
importKeePassXCsv(file, success, error);
|
||||||
@@ -182,7 +179,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function importLocal(file, success, error) {
|
function importBitwardenCsv(file, success, error) {
|
||||||
Papa.parse(file, {
|
Papa.parse(file, {
|
||||||
header: true,
|
header: true,
|
||||||
encoding: 'UTF-8',
|
encoding: 'UTF-8',
|
||||||
@@ -340,33 +337,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function importSafeInCloudCsv(file, success, error) {
|
|
||||||
Papa.parse(file, {
|
|
||||||
header: true,
|
|
||||||
encoding: 'UTF-8',
|
|
||||||
complete: function (results) {
|
|
||||||
parseCsvErrors(results);
|
|
||||||
|
|
||||||
var folders = [],
|
|
||||||
logins = [],
|
|
||||||
loginRelationships = [];
|
|
||||||
|
|
||||||
angular.forEach(results.data, function (value, key) {
|
|
||||||
logins.push({
|
|
||||||
favorite: false,
|
|
||||||
uri: value.URL && value.URL !== '' ? trimUri(value.URL) : null,
|
|
||||||
username: value.Login && value.Login !== '' ? value.Login : null,
|
|
||||||
password: value.Password && value.Password !== '' ? value.Password : null,
|
|
||||||
notes: value.Notes && value.Notes !== '' ? value.Notes : null,
|
|
||||||
name: value.Title && value.Title !== '' ? value.Title : '--',
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
success(folders, logins, loginRelationships);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function importSafeInCloudXml(file, success, error) {
|
function importSafeInCloudXml(file, success, error) {
|
||||||
var folders = [],
|
var folders = [],
|
||||||
logins = [],
|
logins = [],
|
||||||
@@ -557,7 +527,7 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function importKeePassXml(file, success, error) {
|
function importKeePass2Xml(file, success, error) {
|
||||||
var folders = [],
|
var folders = [],
|
||||||
logins = [],
|
logins = [],
|
||||||
loginRelationships = [];
|
loginRelationships = [];
|
||||||
|
|||||||
@@ -6,8 +6,7 @@
|
|||||||
$uibModal.open({
|
$uibModal.open({
|
||||||
animation: true,
|
animation: true,
|
||||||
templateUrl: 'app/tools/views/toolsImport.html',
|
templateUrl: 'app/tools/views/toolsImport.html',
|
||||||
controller: 'toolsImportController',
|
controller: 'toolsImportController'
|
||||||
size: 'sm'
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,132 @@
|
|||||||
angular
|
angular
|
||||||
.module('bit.tools')
|
.module('bit.tools')
|
||||||
|
|
||||||
.controller('toolsImportController', function ($scope, $state, apiService, $uibModalInstance, cryptoService, cipherService, toastr, importService, $analytics) {
|
.controller('toolsImportController', function ($scope, $state, apiService, $uibModalInstance, cryptoService, cipherService, toastr, importService, $analytics, $sce) {
|
||||||
$analytics.eventTrack('toolsImportController', { category: 'Modal' });
|
$analytics.eventTrack('toolsImportController', { category: 'Modal' });
|
||||||
$scope.model = { source: 'local' };
|
$scope.model = { source: 'bitwardencsv' };
|
||||||
|
$scope.source = {};
|
||||||
|
|
||||||
|
$scope.options = [
|
||||||
|
{
|
||||||
|
id: 'bitwardencsv',
|
||||||
|
name: 'bitwarden (csv)',
|
||||||
|
instructions: $sce.trustAsHtml('Export using the web vault (vault.bitwarden.com). ' +
|
||||||
|
'Log into the web vault and navigate to "Tools" > "Export".')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'lastpass',
|
||||||
|
name: 'LastPass (csv)',
|
||||||
|
instructions: $sce.trustAsHtml('See detailed instructions on our help site at ' +
|
||||||
|
'<a target="_blank" href="https://help.bitwarden.com/getting-started/import-from-lastpass/">' +
|
||||||
|
'https://help.bitwarden.com/getting-started/import-from-lastpass/</a>')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'chromecsv',
|
||||||
|
name: 'Chrome (csv)',
|
||||||
|
instructions: $sce.trustAsHtml('See detailed instructions on our help site at ' +
|
||||||
|
'<a target="_blank" href="https://help.bitwarden.com/getting-started/import-from-chrome/">' +
|
||||||
|
'https://help.bitwarden.com/getting-started/import-from-chrome/</a>')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'firefoxpasswordexportercsvxml',
|
||||||
|
name: 'Firefox Password Exporter (xml)',
|
||||||
|
instructions: $sce.trustAsHtml('Use the ' +
|
||||||
|
'<a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/password-exporter/">' +
|
||||||
|
'Password Exporter</a> addon for FireFox to export your passwords to an XML file.')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'keepass2xml',
|
||||||
|
name: 'KeePass 2 (xml)',
|
||||||
|
instructions: $sce.trustAsHtml('Using the KeePass 2 desktop application, navigate to "File" > "Export" and ' +
|
||||||
|
'select the KeePass XML (2.x) option.')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'keepassxcsv',
|
||||||
|
name: 'KeePassX (csv)',
|
||||||
|
instructions: $sce.trustAsHtml('Using the KeePassX desktop application, navigate to "Database" > ' +
|
||||||
|
'"Export to CSV file" and save the CSV file.')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'dashlanecsv',
|
||||||
|
name: 'Dashlane (csv)',
|
||||||
|
instructions: $sce.trustAsHtml('Using the Dashlane desktop application, navigate to "File" > "Export" > ' +
|
||||||
|
'"Unsecured archive (readable) in CSV format" and save the CSV file.')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '1password41pif',
|
||||||
|
name: '1Password 4 (1pif)',
|
||||||
|
instructions: $sce.trustAsHtml('See detailed instructions on our help site at ' +
|
||||||
|
'<a target="_blank" href="https://help.bitwarden.com/getting-started/import-from-1password/">' +
|
||||||
|
'https://help.bitwarden.com/getting-started/import-from-1password/</a>')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '1password6csv',
|
||||||
|
name: '1Password 6 (csv)',
|
||||||
|
instructions: $sce.trustAsHtml('See detailed instructions on our help site at ' +
|
||||||
|
'<a target="_blank" href="https://help.bitwarden.com/getting-started/import-from-1password/">' +
|
||||||
|
'https://help.bitwarden.com/getting-started/import-from-1password/</a>')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'roboformhtml',
|
||||||
|
name: 'RoboForm (html)',
|
||||||
|
instructions: $sce.trustAsHtml('Using the RoboForm Editor desktop application, navigate to "RoboForm" ' +
|
||||||
|
'(top left) > "Print List" > "Logins". When the following print dialog pops up click on the "Save" button ' +
|
||||||
|
'and save the HTML file.')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'keepercsv',
|
||||||
|
name: 'Keeper (csv)',
|
||||||
|
instructions: $sce.trustAsHtml('Log into the Keeper web vault (keepersecurity.com/vault). Navigate to "Backup" ' +
|
||||||
|
'(top right) and find the "Export to Text File" option. Click "Export Now" to save the TXT/CSV file.')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'enpasscsv',
|
||||||
|
name: 'Enpass (csv)',
|
||||||
|
instructions: $sce.trustAsHtml('Using the Enpass desktop application, navigate to "File" > "Export" > ' +
|
||||||
|
'"As CSV". Select "Yes" to the warning alert and save the CSV file.')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'safeincloudxml',
|
||||||
|
name: 'SafeInCloud (xml)',
|
||||||
|
instructions: $sce.trustAsHtml('Using the SaveInCloud desktop application, navigate to "File" > "Export" > ' +
|
||||||
|
'"As XML" and save the XML file.')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'pwsafexml',
|
||||||
|
name: 'Password Safe (xml)',
|
||||||
|
instructions: $sce.trustAsHtml('Using the Password Safe desktop application, navigate to "File" > ' +
|
||||||
|
'"Export To" > "XML format..." and save the XML file.')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'stickypasswordxml',
|
||||||
|
name: 'Sticky Password (xml)',
|
||||||
|
instructions: $sce.trustAsHtml('Using the Sticky Password desktop application, navigate to "Menu" ' +
|
||||||
|
'(top right) > "Export" > "Export all". Select the unencrypted format XML option and then the ' +
|
||||||
|
'"Save to file" button. Save the XML file.')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'msecurecsv',
|
||||||
|
name: 'mSecure (csv)',
|
||||||
|
instructions: $sce.trustAsHtml('Using the mSecure desktop application, navigate to "File" > ' +
|
||||||
|
'"Export" > "CSV File..." and save the CSV file.')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'truekeyjson',
|
||||||
|
name: 'True Key (json)',
|
||||||
|
instructions: $sce.trustAsHtml('Using the True Key desktop application, click the gear icon (top right) and ' +
|
||||||
|
'then navigate to "App Settings". Click the "Export" button and save the JSON file.')
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
$scope.setSource = function () {
|
||||||
|
for (var i = 0; i < $scope.options.length; i++) {
|
||||||
|
if ($scope.options[i].id === $scope.model.source) {
|
||||||
|
$scope.source = $scope.options[i];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
$scope.setSource();
|
||||||
|
|
||||||
$scope.import = function (model) {
|
$scope.import = function (model) {
|
||||||
$scope.processing = true;
|
$scope.processing = true;
|
||||||
|
|||||||
@@ -6,36 +6,14 @@
|
|||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="source">Source</label>
|
<label for="source">Source</label>
|
||||||
<select id="source" name="source" class="form-control" ng-model="model.source">
|
<select id="source" name="source" class="form-control" ng-model="model.source" ng-change="setSource()">
|
||||||
<option value="local">bitwarden (csv)</option>
|
<option ng-repeat="option in options" value="{{option.id}}">{{option.name}}</option>
|
||||||
<option value="lastpass">LastPass (csv)</option>
|
|
||||||
<option value="chromecsv">Chrome (csv)</option>
|
|
||||||
<option value="firefoxpasswordexportercsvxml">Firefox Password Exporter (xml)</option>
|
|
||||||
<option value="keepassxml">KeePass (xml)</option>
|
|
||||||
<option value="keepassxcsv">KeePassX (csv)</option>
|
|
||||||
<option value="dashlanecsv">Dashlane (csv)</option>
|
|
||||||
<option value="1password41pif">1Password 4 (1pif)</option>
|
|
||||||
<option value="1password6csv">1Password 6 (csv)</option>
|
|
||||||
<option value="roboformhtml">RoboForm (html)</option>
|
|
||||||
<option value="keepercsv">Keeper (csv)</option>
|
|
||||||
<option value="enpasscsv">Enpass (csv)</option>
|
|
||||||
<option value="safeincloudxml">SafeInCloud (xml)</option>
|
|
||||||
<option value="safeincloudcsv">SafeInCloud (csv)</option>
|
|
||||||
<option value="pwsafexml">Password Safe (xml)</option>
|
|
||||||
<option value="stickypasswordxml">Sticky Password (xml)</option>
|
|
||||||
<option value="msecurecsv">mSecure (csv)</option>
|
|
||||||
<option value="truekeyjson">True Key (json)</option>
|
|
||||||
<option value="passwordbossjson">Password Boss (json)</option>
|
|
||||||
<option value="zohovaultcsv">Zoho Vault (csv)</option>
|
|
||||||
<option value="passworddragonxml">Password Dragon (xml)</option>
|
|
||||||
<option value="padlockcsv">Padlock (csv)</option>
|
|
||||||
<option value="clipperzhtml">Clipperz (html)</option>
|
|
||||||
<option value="avirajson">Avira (json)</option>
|
|
||||||
<option value="saferpasscsv">SaferPass (csv)</option>
|
|
||||||
<option value="upmcsv">Universal Password Manager (csv)</option>
|
|
||||||
<option value="ascendocsv">Ascendo DataVault (csv)</option>
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="callout callout-default">
|
||||||
|
<h4><i class="fa fa-info-circle"></i> {{source.name}} Instructions</h4>
|
||||||
|
<div ng-bind-html="source.instructions"></div>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="file">File</label>
|
<label for="file">File</label>
|
||||||
<input type="file" id="file" name="file" required />
|
<input type="file" id="file" name="file" required />
|
||||||
|
|||||||
@@ -112,6 +112,23 @@ form .btn .loading-icon {
|
|||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Callouts */
|
||||||
|
|
||||||
|
.callout.callout-default {
|
||||||
|
&:extend(.bg-gray-light);
|
||||||
|
border-color: darken(@gray, 10%);
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: @link-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover,
|
||||||
|
a:active,
|
||||||
|
a:focus {
|
||||||
|
color: @link-hover-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Toastr */
|
/* Toastr */
|
||||||
|
|
||||||
#toast-container {
|
#toast-container {
|
||||||
|
|||||||
Reference in New Issue
Block a user