mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-27 12:36:14 +01:00
Merge pull request #125 from bitwarden/display-port-in-vault-list
Modified response to include port if exists
This commit is contained in:
commit
f820cb9186
@ -26,6 +26,7 @@ export class LoginUriView implements View {
|
|||||||
private _uri: string = null;
|
private _uri: string = null;
|
||||||
private _domain: string = null;
|
private _domain: string = null;
|
||||||
private _hostname: string = null;
|
private _hostname: string = null;
|
||||||
|
private _host: string = null;
|
||||||
private _canLaunch: boolean = null;
|
private _canLaunch: boolean = null;
|
||||||
// tslint:enable
|
// tslint:enable
|
||||||
|
|
||||||
@ -71,10 +72,28 @@ export class LoginUriView implements View {
|
|||||||
return this._hostname;
|
return this._hostname;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get host(): string {
|
||||||
|
if (this.match === UriMatchType.RegularExpression) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if (this._host == null && this.uri != null) {
|
||||||
|
this._host = Utils.getHost(this.uri);
|
||||||
|
if (this._host === '') {
|
||||||
|
this._host = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return this._host;
|
||||||
|
}
|
||||||
|
|
||||||
get hostnameOrUri(): string {
|
get hostnameOrUri(): string {
|
||||||
return this.hostname != null ? this.hostname : this.uri;
|
return this.hostname != null ? this.hostname : this.uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get hostOrUri(): string {
|
||||||
|
return this.host != null ? this.host : this.uri;
|
||||||
|
}
|
||||||
|
|
||||||
get isWebsite(): boolean {
|
get isWebsite(): boolean {
|
||||||
return this.uri != null && (this.uri.indexOf('http://') === 0 || this.uri.indexOf('https://') === 0 ||
|
return this.uri != null && (this.uri.indexOf('http://') === 0 || this.uri.indexOf('https://') === 0 ||
|
||||||
(this.uri.indexOf('://') < 0 && Utils.tldEndingRegex.test(this.uri)));
|
(this.uri.indexOf('://') < 0 && Utils.tldEndingRegex.test(this.uri)));
|
||||||
|
Loading…
Reference in New Issue
Block a user