1
0
mirror of https://github.com/bitwarden/web synced 2025-12-15 07:43:16 +00:00

renaming org vault logins to ciphers

This commit is contained in:
Kyle Spearrin
2017-10-11 15:54:47 -04:00
parent 2963516d5c
commit 7f6ee21a8e
11 changed files with 146 additions and 126 deletions

View File

@@ -271,7 +271,8 @@ angular
function setLoginIcon(cipher, uri, setImage) {
if (uri) {
var hostnameUri = uri;
var hostnameUri = uri,
isWebsite = false;
if (hostnameUri.indexOf('androidapp://') === 0) {
cipher.icon = 'fa-android';
@@ -282,9 +283,13 @@ angular
else if (hostnameUri.indexOf('://') === -1 && hostnameUri.indexOf('http://') !== 0 &&
hostnameUri.indexOf('https://') !== 0) {
hostnameUri = "http://" + hostnameUri;
isWebsite = true;
}
else {
isWebsite = hostnameUri.indexOf('http') === 0 && hostnameUri.indexOf('.') > 0;
}
if (setImage && !cipher.icon && hostnameUri.indexOf('.') > 0) {
if (setImage && isWebsite) {
try {
var url = new URL(hostnameUri);
cipher.meta.image = 'https://icons.bitwarden.com?url=' + url.hostname;