mirror of
https://github.com/bitwarden/browser
synced 2025-12-19 01:33:33 +00:00
Add extra encrypted export warnings
This commit is contained in:
@@ -5,6 +5,8 @@ import {
|
||||
OnInit,
|
||||
} from '@angular/core';
|
||||
|
||||
import * as os from 'os';
|
||||
|
||||
import { CryptoService } from 'jslib/abstractions/crypto.service';
|
||||
import { EventService } from 'jslib/abstractions/event.service';
|
||||
import { ExportService } from 'jslib/abstractions/export.service';
|
||||
@@ -49,4 +51,21 @@ export class ExportComponent extends BaseExportComponent implements OnInit {
|
||||
onWindowHidden() {
|
||||
this.showPassword = false;
|
||||
}
|
||||
|
||||
async warningDialog() {
|
||||
if (this.encryptedFormat) {
|
||||
return await this.platformUtilsService.showDialog(
|
||||
this.i18nService.t('encExportKeyWarningDesc') +
|
||||
os.EOL + os.EOL +
|
||||
this.i18nService.t('encExportAccountWarningDesc'),
|
||||
this.i18nService.t('confirmVaultExport'), this.i18nService.t('exportVault'),
|
||||
this.i18nService.t('cancel'), 'warning',
|
||||
true);
|
||||
} else {
|
||||
return await this.platformUtilsService.showDialog(
|
||||
this.i18nService.t('exportWarningDesc'),
|
||||
this.i18nService.t('confirmVaultExport'), this.i18nService.t('exportVault'),
|
||||
this.i18nService.t('cancel'), 'warning');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user