5 changed files with 78 additions and 1 deletions
@ -0,0 +1,21 @@
@@ -0,0 +1,21 @@
|
||||
<bit-dialog> |
||||
<span bitDialogTitle>{{ applicationName }}</span> |
||||
<ng-container bitDialogContent> |
||||
<div class="tw-flex tw-flex-col tw-gap-2"> |
||||
<span bitDialogTitle>{{ "atRiskMembersWithCount" | i18n: members.length }} </span> |
||||
<span class="tw-text-muted">{{ |
||||
"atRiskMembersDescriptionWithApp" | i18n: applicationName |
||||
}}</span> |
||||
<div class="tw-mt-1"> |
||||
<ng-container *ngFor="let member of members"> |
||||
<div>{{ member.email }}</div> |
||||
</ng-container> |
||||
</div> |
||||
</div> |
||||
</ng-container> |
||||
<ng-container bitDialogFooter> |
||||
<button bitButton bitDialogClose buttonType="secondary" type="button"> |
||||
{{ "ok" | i18n }} |
||||
</button> |
||||
</ng-container> |
||||
</bit-dialog> |
||||
@ -0,0 +1,35 @@
@@ -0,0 +1,35 @@
|
||||
import { DIALOG_DATA } from "@angular/cdk/dialog"; |
||||
import { CommonModule } from "@angular/common"; |
||||
import { Component, Inject } from "@angular/core"; |
||||
|
||||
import { JslibModule } from "@bitwarden/angular/jslib.module"; |
||||
import { MemberDetailsFlat } from "@bitwarden/bit-common/tools/reports/risk-insights/models/password-health"; |
||||
import { ButtonModule, DialogModule, DialogService } from "@bitwarden/components"; |
||||
|
||||
type AppAtRiskMembersDialogParams = { |
||||
members: MemberDetailsFlat[]; |
||||
applicationName: string; |
||||
}; |
||||
|
||||
export const openAppAtRiskMembersDialog = ( |
||||
dialogService: DialogService, |
||||
dialogConfig: AppAtRiskMembersDialogParams, |
||||
) => |
||||
dialogService.open<boolean, AppAtRiskMembersDialogParams>(AppAtRiskMembersDialogComponent, { |
||||
data: dialogConfig, |
||||
}); |
||||
|
||||
@Component({ |
||||
standalone: true, |
||||
templateUrl: "./app-at-risk-members-dialog.component.html", |
||||
imports: [ButtonModule, CommonModule, JslibModule, DialogModule], |
||||
}) |
||||
export class AppAtRiskMembersDialogComponent { |
||||
protected members: MemberDetailsFlat[]; |
||||
protected applicationName: string; |
||||
|
||||
constructor(@Inject(DIALOG_DATA) private params: AppAtRiskMembersDialogParams) { |
||||
this.members = params.members; |
||||
this.applicationName = params.applicationName; |
||||
} |
||||
} |
||||
Loading…
Reference in new issue