improt instructions
This commit is contained in:
parent
e59277742d
commit
9b67f6e398
|
@ -12,6 +12,29 @@
|
|||
<option *ngFor="let o of importOptions" [ngValue]="o.id">{{o.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="alert alert-info" role="alert" *ngIf="format">
|
||||
<h4 class="alert-heading">{{'instructionsFor' | i18n : getFormatName()}}</h4>
|
||||
<p class="mb-0">
|
||||
<ng-container *ngIf="format === 'bitwardencsv'">
|
||||
See detailed instructions on our help site at
|
||||
<a target="_blank" href="https://help.bitwarden.com/article/export-your-data/">https://help.bitwarden.com/article/export-your-data/</a>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="format === 'lastpasscsv'">
|
||||
See detailed instructions on our help site at
|
||||
<a target="_blank" href="https://help.bitwarden.com/article/import-from-lastpass/">https://help.bitwarden.com/article/import-from-lastpass/</a>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="format === 'keepassxcsv'">
|
||||
Using the KeePassX desktop application, navigate to "Database" → "Export to CSV file" and save the CSV file.
|
||||
</ng-container>
|
||||
<ng-container *ngIf="format === 'aviracsv'">
|
||||
In the Avira web vault, go to "Settings" → "My Data" → "Export data" and save the CSV file.
|
||||
</ng-container>
|
||||
</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<div class="form-group">
|
||||
<label for="file">2. {{'selectImportFile' | i18n}}</label>
|
||||
<input type="file" id="file" class="form-control-file" name="file">
|
||||
|
|
|
@ -165,6 +165,18 @@ export class ImportComponent {
|
|||
}
|
||||
}
|
||||
|
||||
getFormatName() {
|
||||
if (this.format == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const results = this.featuredImportOptions.concat(this.importOptions).filter((o) => o.id === this.format);
|
||||
if (results.length > 0) {
|
||||
return results[0].name;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private getFileContents(file: File): Promise<string> {
|
||||
return new Promise((resolve, reject) => {
|
||||
const reader = new FileReader();
|
||||
|
|
|
@ -883,5 +883,15 @@
|
|||
},
|
||||
"orCopyPasteFileContents": {
|
||||
"message": "or copy/paste the import file contents"
|
||||
},
|
||||
"instructionsFor": {
|
||||
"message": "$NAME$ Instructions",
|
||||
"description": "The title for the import tool instructions.",
|
||||
"placeholders": {
|
||||
"name": {
|
||||
"content": "$1",
|
||||
"example": "LastPass (csv)"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue