1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 09:13:33 +00:00

refactor(components): remove deprecated HintComponent and related code

- Remove HintComponent
- Clean up orphaned functionality
- Remove unused translation messages

Closes PM-9727
This commit is contained in:
Alec Rippberger
2025-03-13 09:56:50 -05:00
committed by GitHub
parent 7e96b7a9a6
commit 1d1358407e
13 changed files with 0 additions and 338 deletions

View File

@@ -263,12 +263,6 @@
"enterYourAccountEmailAddressAndYourPasswordHintWillBeSentToYou": {
"message": "Enter your account email address and your password hint will be sent to you"
},
"passwordHint": {
"message": "Password hint"
},
"enterEmailToGetHint": {
"message": "Enter your account email address to receive your master password hint."
},
"getMasterPasswordHint": {
"message": "Get master password hint"
},

View File

@@ -1,41 +0,0 @@
<form #form (ngSubmit)="submit()" [appApiAction]="formPromise">
<header>
<div class="left">
<button type="button" routerLink="/login">
{{ "cancel" | i18n }}
</button>
</div>
<h1 class="center">
<span class="title">{{ "passwordHint" | i18n }}</span>
</h1>
<div class="right">
<button type="submit" [disabled]="form.loading">
<span [hidden]="form.loading">{{ "submit" | i18n }}</span>
<i class="bwi bwi-spinner bwi-lg bwi-spin" [hidden]="!form.loading" aria-hidden="true"></i>
</button>
</div>
</header>
<main tabindex="-1">
<div class="box">
<div class="box-content">
<div class="box-content-row" appBoxRow>
<label for="email">{{ "emailAddress" | i18n }}</label>
<input
id="email"
type="text"
name="Email"
aria-describedby="emailHelp"
[(ngModel)]="email"
required
appAutofocus
inputmode="email"
appInputVerbatim="false"
/>
</div>
</div>
<div id="emailHelp" class="box-footer">
{{ "enterEmailToGetHint" | i18n }}
</div>
</div>
</main>
</form>

View File

@@ -1,43 +0,0 @@
import { Component } from "@angular/core";
import { ActivatedRoute, Router } from "@angular/router";
import { HintComponent as BaseHintComponent } from "@bitwarden/angular/auth/components/hint.component";
import { LoginEmailServiceAbstraction } from "@bitwarden/auth/common";
import { ApiService } from "@bitwarden/common/abstractions/api.service";
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
import { ToastService } from "@bitwarden/components";
@Component({
selector: "app-hint",
templateUrl: "hint.component.html",
})
export class HintComponent extends BaseHintComponent {
constructor(
router: Router,
platformUtilsService: PlatformUtilsService,
i18nService: I18nService,
apiService: ApiService,
logService: LogService,
private route: ActivatedRoute,
loginEmailService: LoginEmailServiceAbstraction,
toastService: ToastService,
) {
super(
router,
i18nService,
apiService,
platformUtilsService,
logService,
loginEmailService,
toastService,
);
this.onSuccessfulSubmit = async () => {
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
// eslint-disable-next-line @typescript-eslint/no-floating-promises
this.router.navigate([this.successRoute]);
};
}
}

View File

@@ -21,7 +21,6 @@ import { AccountComponent } from "../auth/popup/account-switching/account.compon
import { CurrentAccountComponent } from "../auth/popup/account-switching/current-account.component";
import { EnvironmentComponent } from "../auth/popup/environment.component";
import { ExtensionAnonLayoutWrapperComponent } from "../auth/popup/extension-anon-layout-wrapper/extension-anon-layout-wrapper.component";
import { HintComponent } from "../auth/popup/hint.component";
import { LoginDecryptionOptionsComponentV1 } from "../auth/popup/login-decryption-options/login-decryption-options-v1.component";
import { RemovePasswordComponent } from "../auth/popup/remove-password.component";
import { SetPasswordComponent } from "../auth/popup/set-password.component";
@@ -94,7 +93,6 @@ import "../platform/popup/locales";
ColorPasswordPipe,
ColorPasswordCountPipe,
EnvironmentComponent,
HintComponent,
LoginDecryptionOptionsComponentV1,
SetPasswordComponent,
SsoComponentV1,