1
0
mirror of https://github.com/bitwarden/browser synced 2026-03-02 11:31:44 +00:00

Merge remote-tracking branch 'origin' into auth/pm-7882/email-verification-removal

This commit is contained in:
Patrick Pimentel
2024-12-27 17:35:51 -05:00
468 changed files with 11501 additions and 7965 deletions

View File

@@ -75,7 +75,7 @@ const clientTypeToSuccessRouteRecord: Partial<Record<ClientType, string>> = {
IconButtonModule,
],
})
export class LockV2Component implements OnInit, OnDestroy {
export class LockComponent implements OnInit, OnDestroy {
private destroy$ = new Subject<void>();
activeAccount: Account | null;
@@ -543,8 +543,8 @@ export class LockV2Component implements OnInit, OnDestroy {
const previousUrl = this.lockComponentService.getPreviousUrl();
/**
* In a passkey flow, the `previousUrl` will still be `/fido2?<queryParams>` at this point
* because the `/lockV2` route doesn't save the URL in the `BrowserRouterService`. This is
* handled by the `doNotSaveUrl` property on the `lockV2` route in `app-routing.module.ts`.
* because the `/lock` route doesn't save the URL in the `BrowserRouterService`. This is
* handled by the `doNotSaveUrl` property on the `/lock` route in `app-routing.module.ts`.
*/
if (previousUrl) {
await this.router.navigateByUrl(previousUrl);

View File

@@ -56,5 +56,9 @@
>
{{ "requestAdminApproval" | i18n }}
</button>
<button type="button" bitButton bitFormButton block (click)="logOut()">
{{ "logOut" | i18n }}
</button>
</div>
</ng-container>

View File

@@ -30,6 +30,7 @@ import {
AsyncActionsModule,
ButtonModule,
CheckboxModule,
DialogService,
FormFieldModule,
ToastService,
TypographyModule,
@@ -90,6 +91,7 @@ export class LoginDecryptionOptionsComponent implements OnInit {
private apiService: ApiService,
private destroyRef: DestroyRef,
private deviceTrustService: DeviceTrustServiceAbstraction,
private dialogService: DialogService,
private formBuilder: FormBuilder,
private i18nService: I18nService,
private keyService: KeyService,
@@ -298,4 +300,18 @@ export class LoginDecryptionOptionsComponent implements OnInit {
this.loginEmailService.setLoginEmail(this.email);
await this.router.navigate(["/admin-approval-requested"]);
}
async logOut() {
const confirmed = await this.dialogService.openSimpleDialog({
title: { key: "logOut" },
content: { key: "logOutConfirmation" },
acceptButtonText: { key: "logOut" },
type: "warning",
});
const userId = (await firstValueFrom(this.accountService.activeAccount$))?.id;
if (confirmed) {
this.messagingService.send("logout", { userId: userId });
}
}
}