diff --git a/settings.Preview.json b/settings.Preview.json index d12e8b4af1..27bbd4f845 100644 --- a/settings.Preview.json +++ b/settings.Preview.json @@ -2,6 +2,7 @@ "appSettings": { "apiUri": "https://preview-api.bitwarden.com", "identityUri": "https://preview-identity.bitwarden.com", + "iconsUri": "https://icons.bitwarden.com", "stripeKey": "pk_test_KPoCfZXu7mznb9uSCPZ2JpTD", "braintreeKey": "sandbox_r72q8jq6_9pnxkwm75f87sdc2", "whitelistDomains": [ diff --git a/settings.Production.json b/settings.Production.json index 45d76f6f37..2efa4e442c 100644 --- a/settings.Production.json +++ b/settings.Production.json @@ -2,6 +2,7 @@ "appSettings": { "apiUri": "https://api.bitwarden.com", "identityUri": "https://identity.bitwarden.com", + "iconsUri": "https://icons.bitwarden.com", "stripeKey": "pk_live_bpN0P37nMxrMQkcaHXtAybJk", "braintreeKey": "production_qfbsv8kc_njj2zjtyngtjmbjd", "whitelistDomains": [ diff --git a/settings.json b/settings.json index ac9bf0bb5e..50e2cd34bc 100644 --- a/settings.json +++ b/settings.json @@ -2,6 +2,7 @@ "appSettings": { "apiUri": "http://localhost:4000", "identityUri": "http://localhost:33656", + "iconsUri": "https://icons.bitwarden.com", "stripeKey": "pk_test_KPoCfZXu7mznb9uSCPZ2JpTD", "braintreeKey": "sandbox_r72q8jq6_9pnxkwm75f87sdc2", "whitelistDomains": [ diff --git a/src/app/services/cipherService.js b/src/app/services/cipherService.js index 0cdf2de44f..091dcdc586 100644 --- a/src/app/services/cipherService.js +++ b/src/app/services/cipherService.js @@ -189,7 +189,7 @@ angular }; function setLoginIcon(cipher, uri, setImage) { - if (!appSettings.selfHosted && !_service.disableWebsiteIcons && uri) { + if (!_service.disableWebsiteIcons && uri) { var hostnameUri = uri, isWebsite = false; @@ -210,7 +210,7 @@ angular if (setImage && isWebsite) { try { var url = new URL(hostnameUri); - cipher.meta.image = 'https://icons.bitwarden.com/' + url.hostname + '/icon.png'; + cipher.meta.image = appSettings.iconsUri + '/' + url.hostname + '/icon.png'; } catch (e) { } } diff --git a/src/app/settings.js b/src/app/settings.js index c6817f7ac4..a58bcf73e1 100644 --- a/src/app/settings.js +++ b/src/app/settings.js @@ -1,2 +1,2 @@ angular.module("bit") -.constant("appSettings", {"apiUri":"https://api.bitwarden.com","identityUri":"https://identity.bitwarden.com","stripeKey":"pk_live_bpN0P37nMxrMQkcaHXtAybJk","braintreeKey":"production_qfbsv8kc_njj2zjtyngtjmbjd","whitelistDomains":["api.bitwarden.com"],"selfHosted":false,"version":"1.18.0","environment":"Production"}); +.constant("appSettings", {"apiUri":"https://api.bitwarden.com","identityUri":"https://identity.bitwarden.com","iconsUri":"https://icons.bitwarden.com","stripeKey":"pk_live_bpN0P37nMxrMQkcaHXtAybJk","braintreeKey":"production_qfbsv8kc_njj2zjtyngtjmbjd","whitelistDomains":["api.bitwarden.com"],"selfHosted":false,"version":"1.18.0","environment":"Production"}); diff --git a/src/app/settings/settingsController.js b/src/app/settings/settingsController.js index 1fe8d93917..4721587fe9 100644 --- a/src/app/settings/settingsController.js +++ b/src/app/settings/settingsController.js @@ -2,8 +2,7 @@ .module('bit.settings') .controller('settingsController', function ($scope, $state, $uibModal, apiService, toastr, authService, $localStorage, - appSettings, $rootScope, cipherService) { - $scope.selfHosted = appSettings.selfHosted; + $rootScope, cipherService) { $scope.model = { profile: {}, email: null, @@ -61,10 +60,8 @@ }; $scope.optionsSave = function () { - if (!$scope.selfHosted) { - $localStorage.disableWebsiteIcons = cipherService.disableWebsiteIcons = $scope.model.disableWebsiteIcons; - $rootScope.vaultCiphers = null; - } + $localStorage.disableWebsiteIcons = cipherService.disableWebsiteIcons = $scope.model.disableWebsiteIcons; + $rootScope.vaultCiphers = null; toastr.success('Options have been updated.', 'Success!'); }; diff --git a/src/app/settings/views/settings.html b/src/app/settings/views/settings.html index 6a9a9b618f..3c78af8079 100644 --- a/src/app/settings/views/settings.html +++ b/src/app/settings/views/settings.html @@ -86,7 +86,7 @@ -
+

Web Vault Options