mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 16:53:34 +00:00
lib updates for login view on desktop
This commit is contained in:
@@ -57,4 +57,12 @@ export class CipherView implements View {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
get hasAttachments(): boolean {
|
||||
return this.attachments && this.attachments.length > 0;
|
||||
}
|
||||
|
||||
get hasFields(): boolean {
|
||||
return this.fields && this.fields.length > 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ export class LoginView implements View {
|
||||
get maskedPassword(): string {
|
||||
if (this._maskedPassword == null && this.password != null) {
|
||||
this._maskedPassword = '';
|
||||
for (var i = 0; i < this.password.length; i++) {
|
||||
for (let i = 0; i < this.password.length; i++) {
|
||||
this._maskedPassword += '•';
|
||||
}
|
||||
}
|
||||
@@ -64,4 +64,16 @@ export class LoginView implements View {
|
||||
get subTitle(): string {
|
||||
return this.username;
|
||||
}
|
||||
|
||||
get domainOrUri(): string {
|
||||
return this.domain != null ? this.domain : this.uri;
|
||||
}
|
||||
|
||||
get isWebsite(): boolean {
|
||||
return this.uri != null && (this.uri.indexOf('http://') > -1 || this.uri.indexOf('https://') > -1);
|
||||
}
|
||||
|
||||
get canLaunch(): boolean {
|
||||
return this.uri != null && this.uri.indexOf('://') > -1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user