icons url for self hosted instances
This commit is contained in:
parent
4323341d19
commit
b52ecd8085
|
@ -2,6 +2,7 @@
|
||||||
"appSettings": {
|
"appSettings": {
|
||||||
"apiUri": "https://preview-api.bitwarden.com",
|
"apiUri": "https://preview-api.bitwarden.com",
|
||||||
"identityUri": "https://preview-identity.bitwarden.com",
|
"identityUri": "https://preview-identity.bitwarden.com",
|
||||||
|
"iconsUri": "https://icons.bitwarden.com",
|
||||||
"stripeKey": "pk_test_KPoCfZXu7mznb9uSCPZ2JpTD",
|
"stripeKey": "pk_test_KPoCfZXu7mznb9uSCPZ2JpTD",
|
||||||
"braintreeKey": "sandbox_r72q8jq6_9pnxkwm75f87sdc2",
|
"braintreeKey": "sandbox_r72q8jq6_9pnxkwm75f87sdc2",
|
||||||
"whitelistDomains": [
|
"whitelistDomains": [
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
"appSettings": {
|
"appSettings": {
|
||||||
"apiUri": "https://api.bitwarden.com",
|
"apiUri": "https://api.bitwarden.com",
|
||||||
"identityUri": "https://identity.bitwarden.com",
|
"identityUri": "https://identity.bitwarden.com",
|
||||||
|
"iconsUri": "https://icons.bitwarden.com",
|
||||||
"stripeKey": "pk_live_bpN0P37nMxrMQkcaHXtAybJk",
|
"stripeKey": "pk_live_bpN0P37nMxrMQkcaHXtAybJk",
|
||||||
"braintreeKey": "production_qfbsv8kc_njj2zjtyngtjmbjd",
|
"braintreeKey": "production_qfbsv8kc_njj2zjtyngtjmbjd",
|
||||||
"whitelistDomains": [
|
"whitelistDomains": [
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
"appSettings": {
|
"appSettings": {
|
||||||
"apiUri": "http://localhost:4000",
|
"apiUri": "http://localhost:4000",
|
||||||
"identityUri": "http://localhost:33656",
|
"identityUri": "http://localhost:33656",
|
||||||
|
"iconsUri": "https://icons.bitwarden.com",
|
||||||
"stripeKey": "pk_test_KPoCfZXu7mznb9uSCPZ2JpTD",
|
"stripeKey": "pk_test_KPoCfZXu7mznb9uSCPZ2JpTD",
|
||||||
"braintreeKey": "sandbox_r72q8jq6_9pnxkwm75f87sdc2",
|
"braintreeKey": "sandbox_r72q8jq6_9pnxkwm75f87sdc2",
|
||||||
"whitelistDomains": [
|
"whitelistDomains": [
|
||||||
|
|
|
@ -189,7 +189,7 @@ angular
|
||||||
};
|
};
|
||||||
|
|
||||||
function setLoginIcon(cipher, uri, setImage) {
|
function setLoginIcon(cipher, uri, setImage) {
|
||||||
if (!appSettings.selfHosted && !_service.disableWebsiteIcons && uri) {
|
if (!_service.disableWebsiteIcons && uri) {
|
||||||
var hostnameUri = uri,
|
var hostnameUri = uri,
|
||||||
isWebsite = false;
|
isWebsite = false;
|
||||||
|
|
||||||
|
@ -210,7 +210,7 @@ angular
|
||||||
if (setImage && isWebsite) {
|
if (setImage && isWebsite) {
|
||||||
try {
|
try {
|
||||||
var url = new URL(hostnameUri);
|
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) { }
|
catch (e) { }
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
angular.module("bit")
|
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"});
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
.module('bit.settings')
|
.module('bit.settings')
|
||||||
|
|
||||||
.controller('settingsController', function ($scope, $state, $uibModal, apiService, toastr, authService, $localStorage,
|
.controller('settingsController', function ($scope, $state, $uibModal, apiService, toastr, authService, $localStorage,
|
||||||
appSettings, $rootScope, cipherService) {
|
$rootScope, cipherService) {
|
||||||
$scope.selfHosted = appSettings.selfHosted;
|
|
||||||
$scope.model = {
|
$scope.model = {
|
||||||
profile: {},
|
profile: {},
|
||||||
email: null,
|
email: null,
|
||||||
|
@ -61,10 +60,8 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.optionsSave = function () {
|
$scope.optionsSave = function () {
|
||||||
if (!$scope.selfHosted) {
|
$localStorage.disableWebsiteIcons = cipherService.disableWebsiteIcons = $scope.model.disableWebsiteIcons;
|
||||||
$localStorage.disableWebsiteIcons = cipherService.disableWebsiteIcons = $scope.model.disableWebsiteIcons;
|
$rootScope.vaultCiphers = null;
|
||||||
$rootScope.vaultCiphers = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
toastr.success('Options have been updated.', 'Success!');
|
toastr.success('Options have been updated.', 'Success!');
|
||||||
};
|
};
|
||||||
|
|
|
@ -86,7 +86,7 @@
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="box box-default" ng-if="!selfHosted">
|
<div class="box box-default">
|
||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
<h3 class="box-title">Web Vault Options</h3>
|
<h3 class="box-title">Web Vault Options</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue