mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 09:13:33 +00:00
Expand encrypted export warning (#294)
* Allow html body in showDialog * Add extra warnings about encrypted export
This commit is contained in:
@@ -29,16 +29,27 @@ export class ExportComponent {
|
||||
}
|
||||
|
||||
async submit() {
|
||||
let acceptedWarning;
|
||||
|
||||
if (this.masterPassword == null || this.masterPassword === '') {
|
||||
this.platformUtilsService.showToast('error', this.i18nService.t('errorOccurred'),
|
||||
this.i18nService.t('invalidMasterPassword'));
|
||||
return;
|
||||
}
|
||||
|
||||
const acceptedWarning = await this.platformUtilsService.showDialog(
|
||||
this.i18nService.t(this.encryptedFormat ? 'encExportWarningDesc' : 'exportWarningDesc'),
|
||||
this.i18nService.t('confirmVaultExport'), this.i18nService.t('exportVault'),
|
||||
this.i18nService.t('cancel'), 'warning');
|
||||
if (this.encryptedFormat) {
|
||||
acceptedWarning = await this.platformUtilsService.showDialog(
|
||||
'<p>' + this.i18nService.t('encExportKeyWarningDesc') +
|
||||
'<p>' + this.i18nService.t('encExportAccountWarningDesc'),
|
||||
this.i18nService.t('confirmVaultExport'), this.i18nService.t('exportVault'),
|
||||
this.i18nService.t('cancel'), 'warning',
|
||||
true);
|
||||
} else {
|
||||
acceptedWarning = await this.platformUtilsService.showDialog(
|
||||
this.i18nService.t('exportWarningDesc'),
|
||||
this.i18nService.t('confirmVaultExport'), this.i18nService.t('exportVault'),
|
||||
this.i18nService.t('cancel'), 'warning');
|
||||
}
|
||||
|
||||
if (!acceptedWarning) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user