1
0
mirror of https://github.com/bitwarden/web synced 2025-12-14 23:33:16 +00:00

add option to disable website icons in web vault

This commit is contained in:
Kyle Spearrin
2017-10-23 16:06:55 -04:00
parent d53187935b
commit 52a4317d09
3 changed files with 41 additions and 7 deletions

View File

@@ -1,8 +1,10 @@
angular
.module('bit.services')
.factory('cipherService', function (cryptoService, apiService, $q, $window, constants, appSettings) {
var _service = {};
.factory('cipherService', function (cryptoService, apiService, $q, $window, constants, appSettings, $localStorage) {
var _service = {
disableWebsiteIcons: $localStorage.disableWebsiteIcons
};
_service.decryptCiphers = function (encryptedCiphers) {
if (!encryptedCiphers) throw "encryptedCiphers is undefined or null";
@@ -187,7 +189,7 @@ angular
};
function setLoginIcon(cipher, uri, setImage) {
if (!appSettings.selfHosted && uri) {
if (!appSettings.selfHosted && !_service.disableWebsiteIcons && uri) {
var hostnameUri = uri,
isWebsite = false;