Fix warning banner logic and open link in new tab (#909)

This commit is contained in:
Thomas Rittson 2021-04-06 06:26:04 +10:00 committed by GitHub
parent cd20b1c102
commit b28eaa1aae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -6,9 +6,10 @@
<div class="col-12 text-center" *ngIf="creatorIdentifier != null">
<p>{{'sendCreatorIdentifier' | i18n: creatorIdentifier }}</p>
</div>
<div class="col-8" *ngIf="creatorIdentifier == null && !loading && !unavailable">
<div class="col-8" *ngIf="hideEmail">
<app-callout type="warning" title="{{'warning' | i18n}}">
{{'viewSendHiddenEmailWarning' | i18n }} <a href="https://bitwarden.com/help/article/receive-send/">{{'learnMore' | i18n}}</a>.
{{'viewSendHiddenEmailWarning' | i18n }}
<a href="https://bitwarden.com/help/article/receive-send/" target="_blank">{{'learnMore' | i18n}}</a>.
</app-callout>
</div>
</div>

View File

@ -39,6 +39,7 @@ export class AccessComponent implements OnInit {
showText = false;
unavailable = false;
error = false;
hideEmail = false;
private id: string;
private key: string;
@ -131,6 +132,7 @@ export class AccessComponent implements OnInit {
async load() {
this.unavailable = false;
this.error = false;
this.hideEmail = false;
const keyArray = Utils.fromUrlB64ToArray(this.key);
this.accessRequest = new SendAccessRequest();
if (this.password != null) {
@ -162,5 +164,6 @@ export class AccessComponent implements OnInit {
}
}
this.loading = false;
this.hideEmail = this.creatorIdentifier == null && !this.passwordRequired && !this.loading && !this.unavailable;
}
}