1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-07 12:13:45 +00:00

[PM-18721] setup dialog template

This commit is contained in:
rr-bw
2025-05-03 15:26:08 -07:00
parent 31660abcf9
commit c20b99730b
3 changed files with 54 additions and 2 deletions

View File

@@ -0,0 +1,23 @@
<bit-dialog dialogSize="large">
<span bitDialogTitle>
{{ "takeover" | i18n }}
<small class="tw-text-muted" *ngIf="dialogData.grantorName">{{ dialogData.grantorName }}</small>
</span>
<div bitDialogContent>
<bit-callout type="warning">{{
"emergencyAccessLoggedOutWarning" | i18n: dialogData.grantorName
}}</bit-callout>
<auth-change-password></auth-change-password>
</div>
<ng-container bitDialogFooter>
<button type="submit" bitButton bitFormButton buttonType="primary">
{{ "save" | i18n }}
</button>
<button type="button" bitButton bitFormButton buttonType="secondary" bitDialogClose>
{{ "cancel" | i18n }}
</button>
</ng-container>
</bit-dialog>

View File

@@ -1,6 +1,17 @@
import { CommonModule } from "@angular/common";
import { Component, Inject } from "@angular/core";
import { DIALOG_DATA, DialogConfig, DialogService } from "@bitwarden/components";
import { ChangePasswordComponent } from "@bitwarden/auth/angular";
import {
ButtonModule,
CalloutModule,
DIALOG_DATA,
DialogConfig,
DialogModule,
DialogService,
FormFieldModule,
} from "@bitwarden/components";
import { I18nPipe } from "@bitwarden/ui-common";
type EmergencyAccessTakeoverDialogData = {
grantorName: string;
@@ -24,9 +35,18 @@ export enum EmergencyAccessTakeoverDialogResultType {
standalone: true,
selector: "auth-emergency-access-takeover-dialog",
templateUrl: "./emergency-access-takeover-dialog.component.html",
imports: [
ButtonModule,
CommonModule,
CalloutModule,
ChangePasswordComponent,
DialogModule,
FormFieldModule,
I18nPipe,
],
})
export class EmergencyAccessTakeoverDialogComponent {
constructor(@Inject(DIALOG_DATA) private dialogData: EmergencyAccessTakeoverDialogData) {}
constructor(@Inject(DIALOG_DATA) protected dialogData: EmergencyAccessTakeoverDialogData) {}
/**
* Strongly typed helper to open a EmergencyAccessTakeoverDialogComponent

View File

@@ -5770,6 +5770,15 @@
}
}
},
"emergencyAccessLoggedOutWarning": {
"message": "Proceeding will log $NAME$ out of their current session, requiring them to log back in. Active sessions on other devices may continue to remain active for up to one hour.",
"placeholders": {
"name": {
"content": "$1",
"example": "John Smith"
}
}
},
"thisUser": {
"message": "this user"
},