mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-06 09:20:43 +01:00
maskedPassword is constant 8 char
This commit is contained in:
parent
1f2cf2bcdf
commit
145188c005
@ -7,40 +7,24 @@ import { PlatformUtilsService } from '../../abstractions/platformUtils.service';
|
|||||||
|
|
||||||
export class LoginView implements View {
|
export class LoginView implements View {
|
||||||
username: string;
|
username: string;
|
||||||
|
password: string;
|
||||||
totp: string;
|
totp: string;
|
||||||
uris: LoginUriView[];
|
uris: LoginUriView[];
|
||||||
|
|
||||||
// tslint:disable
|
// tslint:disable
|
||||||
private _username: string;
|
private _username: string;
|
||||||
private _password: string;
|
|
||||||
private _maskedPassword: string;
|
|
||||||
// tslint:enable
|
// tslint:enable
|
||||||
|
|
||||||
constructor(l?: Login) {
|
constructor(l?: Login) {
|
||||||
// ctor
|
// ctor
|
||||||
}
|
}
|
||||||
|
|
||||||
get password(): string {
|
|
||||||
return this._password;
|
|
||||||
}
|
|
||||||
set password(value: string) {
|
|
||||||
this._password = value;
|
|
||||||
this._maskedPassword = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
get uri(): string {
|
get uri(): string {
|
||||||
return this.hasUris ? this.uris[0].uri : null;
|
return this.hasUris ? this.uris[0].uri : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
get maskedPassword(): string {
|
get maskedPassword(): string {
|
||||||
if (this._maskedPassword == null && this.password != null) {
|
return this.password != null ? '••••••••' : null;
|
||||||
this._maskedPassword = '';
|
|
||||||
for (let i = 0; i < this.password.length; i++) {
|
|
||||||
this._maskedPassword += '•';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return this._maskedPassword;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get subTitle(): string {
|
get subTitle(): string {
|
||||||
|
Loading…
Reference in New Issue
Block a user