1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 15:53:27 +00:00

refactor(auth): [PM-9722] remove deprecated LoginDecryptionOptionsComponent

- Remove LoginDecryptionOptionsComponentV1
- Clean up orphaned translation messages
- Remove unused styles
- Clean up related dependencies

Closes PM-9722
This commit is contained in:
Alec Rippberger
2025-03-13 15:37:52 -05:00
committed by GitHub
parent d0f337bf98
commit e9c7cd11a3
15 changed files with 5 additions and 798 deletions

View File

@@ -1,66 +0,0 @@
<div id="login-decryption-options-page">
<div id="content" class="content">
<img class="logo-image" alt="Bitwarden" />
<div class="container loading-spinner" *ngIf="loading">
<i class="bwi bwi-spinner bwi-spin bwi-3x" aria-hidden="true"></i>
</div>
<ng-container *ngIf="!loading">
<h1 id="heading">{{ "loginInitiated" | i18n }}</h1>
<h6
*ngIf="data.state == State.ExistingUserUntrustedDevice"
id="subHeading"
class="standard-bottom-margin"
>
{{ "deviceApprovalRequired" | i18n }}
</h6>
<form id="rememberDeviceForm" class="standard-bottom-margin" [formGroup]="rememberDeviceForm">
<div class="checkbox">
<label for="rememberDevice">
<input
id="rememberDevice"
type="checkbox"
name="rememberDevice"
formControlName="rememberDevice"
/>
{{ "rememberThisDevice" | i18n }}
</label>
</div>
<span id="rememberThisDeviceHintText">{{ "uncheckIfPublicDevice" | i18n }}</span>
</form>
<div *ngIf="data.state == State.ExistingUserUntrustedDevice" class="buttons with-rows">
<div class="buttons-row" *ngIf="data.showApproveFromOtherDeviceBtn">
<button (click)="approveFromOtherDevice()" type="button" class="btn primary block">
{{ "approveFromYourOtherDevice" | i18n }}
</button>
</div>
<div class="buttons-row" *ngIf="data.showReqAdminApprovalBtn">
<button (click)="requestAdminApproval()" type="button" class="btn block">
{{ "requestAdminApproval" | i18n }}
</button>
</div>
<div class="buttons-row" *ngIf="data.showApproveWithMasterPasswordBtn">
<button (click)="approveWithMasterPassword()" type="button" class="btn block">
{{ "approveWithMasterPassword" | i18n }}
</button>
</div>
</div>
<div *ngIf="data.state == State.NewUser" class="buttons with-rows">
<div class="buttons-row">
<button (click)="createUser()" type="button" class="btn block">
{{ "continue" | i18n }}
</button>
</div>
</div>
<div style="text-align: center">
<p class="no-margin">{{ "loggingInAs" | i18n }} {{ data.userEmail }}</p>
<a [routerLink]="[]" (click)="logOut()">{{ "notYou" | i18n }}</a>
</div>
</ng-container>
</div>
</div>

View File

@@ -1,19 +0,0 @@
import { Component } from "@angular/core";
import { BaseLoginDecryptionOptionsComponentV1 } from "@bitwarden/angular/auth/components/base-login-decryption-options-v1.component";
@Component({
selector: "desktop-login-decryption-options",
templateUrl: "login-decryption-options-v1.component.html",
})
export class LoginDecryptionOptionsComponentV1 extends BaseLoginDecryptionOptionsComponentV1 {
override async createUser(): Promise<void> {
try {
await super.createUser();
this.messagingService.send("redrawMenu");
await this.router.navigate(["/vault"]);
} catch (error) {
this.validationService.showError(error);
}
}
}

View File

@@ -5,11 +5,9 @@ import { EnvironmentSelectorComponent } from "@bitwarden/angular/auth/components
import { SharedModule } from "../../app/shared/shared.module";
import { LoginDecryptionOptionsComponentV1 } from "./login-decryption-options/login-decryption-options-v1.component";
@NgModule({
imports: [SharedModule, RouterModule],
declarations: [EnvironmentSelectorComponent, LoginDecryptionOptionsComponentV1],
declarations: [EnvironmentSelectorComponent],
exports: [],
})
export class LoginModule {}

View File

@@ -2772,15 +2772,9 @@
"loginWithMasterPassword": {
"message": "Log in with master password"
},
"loggingInAs": {
"message": "Logging in as"
},
"rememberEmail": {
"message": "Remember email"
},
"notYou": {
"message": "Not you?"
},
"newAroundHere": {
"message": "New around here?"
},
@@ -3020,9 +3014,6 @@
"requestAdminApproval": {
"message": "Request admin approval"
},
"approveWithMasterPassword": {
"message": "Approve with master password"
},
"region": {
"message": "Region"
},

View File

@@ -1,11 +1,9 @@
@import "variables.scss";
#login-page,
#lock-page,
#sso-page,
#set-password-page,
#remove-password-page,
#login-decryption-options-page {
#remove-password-page {
display: flex;
justify-content: center;
align-items: center;
@@ -48,13 +46,11 @@
}
#accessibility-cookie-page,
#login-page,
#register-page,
#hint-page,
#two-factor-page,
#lock-page,
#update-temp-password-page,
#login-decryption-options-page {
#update-temp-password-page {
.content {
width: 325px;
transition: width 0.25s linear;
@@ -189,37 +185,6 @@
}
}
#login-page,
#login-decryption-options-page {
flex-direction: column;
justify-content: unset;
padding-top: 20px;
.login-header {
align-self: flex-start;
padding: 1em;
font-size: 1.2em;
.environment-urls-settings-icon {
@include themify($themes) {
color: themed("mutedColor");
}
span {
visibility: hidden;
}
&:hover,
&:focus {
text-decoration: none;
@include themify($themes) {
color: themed("primaryColor");
}
}
}
}
}
#login-approval-page {
.section-title {
padding: 20px;
@@ -239,14 +204,3 @@
}
}
}
#login-decryption-options-page {
.standard-bottom-margin {
margin-bottom: 20px;
}
#rememberThisDeviceHintText {
font-size: $font-size-small;
color: $text-muted;
}
}