mirror of
https://github.com/bitwarden/browser
synced 2025-12-06 00:13:28 +00:00
Forbid non tailwind classes in browser (#16902)
Enables the non tailwind eslint rule to ensure we don't accidentally add any bad classes to our browser extension. - Notification bar uses a custom CSS file and is excluded. - Removed unused `UserVerificationComponent`.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<!doctype html>
|
||||
<!-- eslint-disable tailwindcss/no-custom-classname -->
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Bitwarden</title>
|
||||
|
||||
@@ -39,7 +39,6 @@ import { FilePopoutCalloutComponent } from "../tools/popup/components/file-popou
|
||||
import { AppRoutingModule } from "./app-routing.module";
|
||||
import { AppComponent } from "./app.component";
|
||||
import { ExtensionAnonLayoutWrapperComponent } from "./components/extension-anon-layout-wrapper/extension-anon-layout-wrapper.component";
|
||||
import { UserVerificationComponent } from "./components/user-verification.component";
|
||||
import { ServicesModule } from "./services/services.module";
|
||||
import { TabsV2Component } from "./tabs-v2.component";
|
||||
|
||||
@@ -91,7 +90,6 @@ import "../platform/popup/locales";
|
||||
ColorPasswordPipe,
|
||||
ColorPasswordCountPipe,
|
||||
TabsV2Component,
|
||||
UserVerificationComponent,
|
||||
RemovePasswordComponent,
|
||||
],
|
||||
exports: [],
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
<ng-container *ngIf="hasMasterPassword">
|
||||
<div class="box-content-row" appBoxRow>
|
||||
<label for="masterPassword">{{ "masterPass" | i18n }}</label>
|
||||
<input
|
||||
id="masterPassword"
|
||||
type="password"
|
||||
name="MasterPasswordHash"
|
||||
aria-describedby="confirmIdentityHelp"
|
||||
class="form-control"
|
||||
[formControl]="secret"
|
||||
required
|
||||
appAutofocus
|
||||
appInputVerbatim
|
||||
/>
|
||||
</div>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="!hasMasterPassword">
|
||||
<div class="box-content-row" appBoxRow>
|
||||
<label class="d-block">{{ "sendVerificationCode" | i18n }}</label>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-outline-secondary"
|
||||
(click)="requestOTP()"
|
||||
[disabled]="disableRequestOTP"
|
||||
>
|
||||
{{ "sendCode" | i18n }}
|
||||
</button>
|
||||
<span class="ml-2 text-success" role="alert" @sent *ngIf="sentCode">
|
||||
<i class="bwi bwi-check-circle" aria-hidden="true"></i>
|
||||
{{ "codeSent" | i18n }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="box-content-row" appBoxRow>
|
||||
<label for="verificationCode">{{ "verificationCode" | i18n }}</label>
|
||||
<input
|
||||
id="verificationCode"
|
||||
type="input"
|
||||
name="verificationCode"
|
||||
class="form-control"
|
||||
[formControl]="secret"
|
||||
required
|
||||
appAutofocus
|
||||
appInputVerbatim
|
||||
/>
|
||||
</div>
|
||||
</ng-container>
|
||||
@@ -1,27 +0,0 @@
|
||||
import { animate, style, transition, trigger } from "@angular/animations";
|
||||
import { Component } from "@angular/core";
|
||||
import { NG_VALUE_ACCESSOR } from "@angular/forms";
|
||||
|
||||
import { UserVerificationComponent as BaseComponent } from "@bitwarden/angular/auth/components/user-verification.component";
|
||||
/**
|
||||
* @deprecated Jan 24, 2024: Use new libs/auth UserVerificationDialogComponent or UserVerificationFormInputComponent instead.
|
||||
* Each client specific component should eventually be converted over to use one of these new components.
|
||||
*/
|
||||
@Component({
|
||||
selector: "app-user-verification",
|
||||
templateUrl: "user-verification.component.html",
|
||||
providers: [
|
||||
{
|
||||
provide: NG_VALUE_ACCESSOR,
|
||||
multi: true,
|
||||
useExisting: UserVerificationComponent,
|
||||
},
|
||||
],
|
||||
animations: [
|
||||
trigger("sent", [
|
||||
transition(":enter", [style({ opacity: 0 }), animate("100ms", style({ opacity: 1 }))]),
|
||||
]),
|
||||
],
|
||||
standalone: false,
|
||||
})
|
||||
export class UserVerificationComponent extends BaseComponent {}
|
||||
@@ -322,7 +322,12 @@ export default tseslint.config(
|
||||
},
|
||||
// Tailwind migrated clients & libs
|
||||
{
|
||||
files: ["apps/web/**/*.html", "bitwarden_license/bit-web/**/*.html", "libs/**/*.html"],
|
||||
files: [
|
||||
"apps/web/**/*.html",
|
||||
"apps/browser/**/*.html",
|
||||
"bitwarden_license/bit-web/**/*.html",
|
||||
"libs/**/*.html",
|
||||
],
|
||||
rules: {
|
||||
"tailwindcss/no-custom-classname": [
|
||||
"error",
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
<!-- eslint-disable-next-line tailwindcss/no-custom-classname -->
|
||||
<div
|
||||
class="bit-tooltip-container"
|
||||
[attr.data-position]="tooltipData.tooltipPosition()"
|
||||
|
||||
Reference in New Issue
Block a user