mirror of
https://github.com/bitwarden/browser.git
synced 2024-09-18 02:41:15 +02:00
fix for org export
This commit is contained in:
parent
e7b5868aad
commit
3b22df15e8
@ -13,6 +13,7 @@ export class ExportComponent {
|
|||||||
|
|
||||||
formPromise: Promise<string>;
|
formPromise: Promise<string>;
|
||||||
masterPassword: string;
|
masterPassword: string;
|
||||||
|
format: 'json' | 'csv' = 'json';
|
||||||
showPassword = false;
|
showPassword = false;
|
||||||
|
|
||||||
constructor(protected cryptoService: CryptoService, protected i18nService: I18nService,
|
constructor(protected cryptoService: CryptoService, protected i18nService: I18nService,
|
||||||
@ -53,11 +54,11 @@ export class ExportComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected getExportData() {
|
protected getExportData() {
|
||||||
return this.exportService.getExport('csv');
|
return this.exportService.getExport(this.format);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected getFileName(prefix?: string) {
|
protected getFileName(prefix?: string) {
|
||||||
return this.exportService.getFileName(prefix);
|
return this.exportService.getFileName(prefix, this.format);
|
||||||
}
|
}
|
||||||
|
|
||||||
private downloadFile(csv: string): void {
|
private downloadFile(csv: string): void {
|
||||||
|
@ -166,7 +166,7 @@ export class ExportService implements ExportServiceAbstraction {
|
|||||||
cipher.build(c);
|
cipher.build(c);
|
||||||
jsonDoc.items.push(cipher);
|
jsonDoc.items.push(cipher);
|
||||||
});
|
});
|
||||||
return JSON.stringify({}, null, ' ');
|
return JSON.stringify(jsonDoc, null, ' ');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user