set globe icon properly
This commit is contained in:
parent
6722793087
commit
65842a3dba
|
@ -51,13 +51,14 @@ angular
|
||||||
hostnameUri.indexOf('https://') !== 0) {
|
hostnameUri.indexOf('https://') !== 0) {
|
||||||
hostnameUri = "http://" + hostnameUri;
|
hostnameUri = "http://" + hostnameUri;
|
||||||
isWebsite = true;
|
isWebsite = true;
|
||||||
|
ctrl.icon = 'fa-globe';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
isWebsite = hostnameUri.indexOf('http') === 0 && hostnameUri.indexOf('.') > 0;
|
isWebsite = hostnameUri.indexOf('http') === 0 && hostnameUri.indexOf('.') > 0;
|
||||||
|
ctrl.icon = 'fa-globe';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isWebsite) {
|
if (isWebsite) {
|
||||||
ctrl.icon = 'fa-globe';
|
|
||||||
try {
|
try {
|
||||||
var url = new URL(hostnameUri);
|
var url = new URL(hostnameUri);
|
||||||
ctrl.image = 'https://icons.bitwarden.com/' + url.hostname + '/icon.png';
|
ctrl.image = 'https://icons.bitwarden.com/' + url.hostname + '/icon.png';
|
||||||
|
|
Loading…
Reference in New Issue