diff --git a/src/abstractions/platformUtils.service.ts b/src/abstractions/platformUtils.service.ts index 918528eaf2..5cd80c8d98 100644 --- a/src/abstractions/platformUtils.service.ts +++ b/src/abstractions/platformUtils.service.ts @@ -25,8 +25,8 @@ export abstract class PlatformUtilsService { supportsDuo: () => boolean; showToast: (type: 'error' | 'success' | 'warning' | 'info', title: string, text: string | string[], options?: any) => void; - showDialog: (text: string, title?: string, confirmText?: string, cancelText?: string, - type?: string) => Promise; + showDialog: (body: string, title?: string, confirmText?: string, cancelText?: string, + type?: string, bodyIsHtml?: boolean) => Promise; eventTrack: (action: string, label?: string, options?: any) => void; isDev: () => boolean; isSelfHost: () => boolean; diff --git a/src/angular/components/export.component.ts b/src/angular/components/export.component.ts index d9e4abdd4c..bad245f197 100644 --- a/src/angular/components/export.component.ts +++ b/src/angular/components/export.component.ts @@ -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( + '

' + this.i18nService.t('encExportKeyWarningDesc') + + '

' + 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;