Expand encrypted export warning (#866)

* Add additional warnings about encrypted export

* Allow html body in showDialog
This commit is contained in:
Thomas Rittson 2021-03-05 06:56:25 +10:00 committed by GitHub
parent 722bcfc31b
commit 473dd8739a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View File

@ -799,9 +799,12 @@
"exportWarningDesc": {
"message": "This export contains your vault data in an unencrypted format. You should not store or send the exported file over unsecure channels (such as email). Delete it immediately after you are done using it."
},
"encExportWarningDesc": {
"encExportKeyWarningDesc": {
"message": "This export encrypts your data using your account's encryption key. If you ever rotate your account's encryption key you should export again since you will not be able to decrypt this export file."
},
"encExportAccountWarningDesc": {
"message": "Account encryption keys are unique to each Bitwarden user account, so you can't import an encrypted export into a different account."
},
"exportMasterPassword": {
"message": "Enter your master password to export your vault data."
},

View File

@ -179,7 +179,8 @@ export class WebPlatformUtilsService implements PlatformUtilsService {
});
}
async showDialog(text: string, title?: string, confirmText?: string, cancelText?: string, type?: string) {
async showDialog(body: string, title?: string, confirmText?: string, cancelText?: string, type?: string,
bodyIsHtml: boolean = false) {
let iconClasses: string = null;
if (type != null) {
// If you add custom types to this part, the type to SweetAlertIcon cast below needs to be changed.
@ -207,7 +208,8 @@ export class WebPlatformUtilsService implements PlatformUtilsService {
buttonsStyling: false,
icon: type as SweetAlertIcon, // required to be any of the SweetAlertIcons to output the iconHtml.
iconHtml: iconHtmlStr,
text: text,
text: bodyIsHtml ? null : body,
html: bodyIsHtml ? body : null,
title: title,
showCancelButton: (cancelText != null),
cancelButtonText: cancelText,