1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-15 07:54:55 +00:00

replace click event with bitDialogClose

This commit is contained in:
Alex
2025-09-11 12:31:47 -04:00
parent 26da146b08
commit da534434bb
2 changed files with 3 additions and 16 deletions

View File

@@ -42,7 +42,7 @@
</div>
</span>
<ng-container bitDialogFooter>
<button bitButton buttonType="primary" type="button" (click)="runReport()">
<button bitButton buttonType="primary" type="button" [bitDialogClose]="true">
{{ "riskInsightsInitPromptRunReport" | i18n }}
</button>
</ng-container>

View File

@@ -1,12 +1,6 @@
import { Component, inject } from "@angular/core";
import { Component } from "@angular/core";
import {
ButtonModule,
DialogModule,
DialogRef,
DialogService,
TypographyModule,
} from "@bitwarden/components";
import { ButtonModule, DialogModule, DialogService, TypographyModule } from "@bitwarden/components";
import { I18nPipe } from "@bitwarden/ui-common";
@Component({
@@ -14,14 +8,7 @@ import { I18nPipe } from "@bitwarden/ui-common";
imports: [ButtonModule, DialogModule, TypographyModule, I18nPipe],
})
export class FirstReportPromptDialogComponent {
private dialogRef = inject(DialogRef);
static open(dialogService: DialogService) {
return dialogService.open<boolean>(FirstReportPromptDialogComponent);
}
runReport(): void {
// Simply close the dialog with 'true' to indicate user wants to run report
this.dialogRef.close(true);
}
}