1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-22 11:45:59 +01:00

Fix build errors for strict templates (#4134)

This commit is contained in:
Oscar Hinton 2022-11-29 00:00:45 +01:00 committed by GitHub
parent ae5df5472c
commit 1686c3b3c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 12 additions and 10 deletions

View File

@ -78,7 +78,7 @@
<input <input
id="login_input_master-password" id="login_input_master-password"
bitInput bitInput
type="{{ showPassword ? 'text' : 'password' }}" [type]="showPassword ? 'text' : 'password'"
formControlName="masterPassword" formControlName="masterPassword"
appAutofocus appAutofocus
/> />

View File

@ -34,7 +34,7 @@
<input <input
id="register-form_input_master-password" id="register-form_input_master-password"
bitInput bitInput
type="{{ showPassword ? 'text' : 'password' }}" [type]="showPassword ? 'text' : 'password'"
formControlName="masterPassword" formControlName="masterPassword"
/> />
<button type="button" bitSuffix bitButton (click)="togglePassword()"> <button type="button" bitSuffix bitButton (click)="togglePassword()">
@ -65,7 +65,7 @@
<input <input
id="register-form_input_confirm-master-password" id="register-form_input_confirm-master-password"
bitInput bitInput
type="{{ showPassword ? 'text' : 'password' }}" [type]="showPassword ? 'text' : 'password'"
formControlName="confirmMasterPassword" formControlName="confirmMasterPassword"
/> />
<button type="button" bitSuffix bitButton (click)="togglePassword()"> <button type="button" bitSuffix bitButton (click)="togglePassword()">

View File

@ -89,7 +89,7 @@
<bit-label>{{ "filePassword" | i18n }}</bit-label> <bit-label>{{ "filePassword" | i18n }}</bit-label>
<input <input
bitInput bitInput
type="{{ showFilePassword ? 'text' : 'password' }}" [type]="showFilePassword ? 'text' : 'password'"
id="filePassword" id="filePassword"
formControlName="filePassword" formControlName="filePassword"
name="password" name="password"
@ -123,7 +123,7 @@
<bit-label>{{ "confirmFilePassword" | i18n }}</bit-label> <bit-label>{{ "confirmFilePassword" | i18n }}</bit-label>
<input <input
bitInput bitInput
type="{{ showConfirmFilePassword ? 'text' : 'password' }}" [type]="showConfirmFilePassword ? 'text' : 'password'"
id="confirmFilePassword" id="confirmFilePassword"
formControlName="confirmFilePassword" formControlName="confirmFilePassword"
name="confirmFilePassword" name="confirmFilePassword"

View File

@ -19,7 +19,7 @@
<input <input
bitInput bitInput
required required
type="{{ showFilePassword ? 'text' : 'password' }}" [type]="showFilePassword ? 'text' : 'password'"
name="filePassword" name="filePassword"
[formControl]="filePassword" [formControl]="filePassword"
appAutofocus appAutofocus

View File

@ -54,7 +54,7 @@
<bit-label>{{ "scimApiKey" | i18n }}</bit-label> <bit-label>{{ "scimApiKey" | i18n }}</bit-label>
<input <input
bitInput bitInput
type="{{ showScimKey ? 'text' : 'password' }}" [type]="showScimKey ? 'text' : 'password'"
formControlName="clientSecret" formControlName="clientSecret"
id="clientSecret" id="clientSecret"
/> />

View File

@ -1,3 +1,5 @@
export type InputTypes = "text" | "password" | "number" | "datetime-local" | "email" | "checkbox";
export abstract class BitFormFieldControl { export abstract class BitFormFieldControl {
ariaDescribedBy: string; ariaDescribedBy: string;
id: string; id: string;
@ -5,7 +7,7 @@ export abstract class BitFormFieldControl {
required: boolean; required: boolean;
hasError: boolean; hasError: boolean;
error: [string, any]; error: [string, any];
type?: "text" | "password"; type?: InputTypes;
spellcheck?: boolean; spellcheck?: boolean;
focus?: () => void; focus?: () => void;
} }

View File

@ -1,7 +1,7 @@
import { Directive, ElementRef, HostBinding, Input, NgZone, Optional, Self } from "@angular/core"; import { Directive, ElementRef, HostBinding, Input, NgZone, Optional, Self } from "@angular/core";
import { NgControl, Validators } from "@angular/forms"; import { NgControl, Validators } from "@angular/forms";
import { BitFormFieldControl } from "../form-field/form-field-control"; import { BitFormFieldControl, InputTypes } from "../form-field/form-field-control";
// Increments for each instance of this component // Increments for each instance of this component
let nextId = 0; let nextId = 0;
@ -45,7 +45,7 @@ export class BitInputDirective implements BitFormFieldControl {
return this.hasError ? true : undefined; return this.hasError ? true : undefined;
} }
@HostBinding("attr.type") @Input() type?: "text" | "password"; @HostBinding("attr.type") @Input() type?: InputTypes;
@HostBinding("attr.spellcheck") @Input() spellcheck?: boolean; @HostBinding("attr.spellcheck") @Input() spellcheck?: boolean;