1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-13 15:03:26 +00:00

Merge branch 'master' into feature/i18n-component-template

This commit is contained in:
Shane Melton
2023-10-10 07:47:04 -07:00
committed by GitHub
171 changed files with 3283 additions and 286 deletions

View File

@@ -1,5 +1,5 @@
import { DialogRef } from "@angular/cdk/dialog";
import { Directive, HostListener, Input, Optional } from "@angular/core";
import { Directive, HostBinding, HostListener, Input, Optional } from "@angular/core";
@Directive({
selector: "[bitDialogClose]",
@@ -9,7 +9,17 @@ export class DialogCloseDirective {
constructor(@Optional() public dialogRef: DialogRef) {}
@HostListener("click") close(): void {
@HostBinding("attr.disabled")
get disableClose() {
return this.dialogRef?.disableClose ? true : null;
}
@HostListener("click")
close(): void {
if (this.disableClose) {
return;
}
this.dialogRef.close(this.dialogResult);
}
}