1
0
mirror of https://github.com/bitwarden/web synced 2026-01-04 01:23:22 +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,11 +1,13 @@
angular
.module('bit.settings')
.controller('settingsController', function ($scope, $state, $uibModal, apiService, toastr, authService) {
.controller('settingsController', function ($scope, $state, $uibModal, apiService, toastr, authService, $localStorage,
appSettings, $rootScope, cipherService) {
$scope.selfHosted = appSettings.selfHosted;
$scope.model = {
profile: {},
twoFactorEnabled: false,
email: null
email: null,
disableWebsiteIcons: false
};
$scope.$on('$viewContentLoaded', function () {
@@ -17,7 +19,7 @@
culture: user.Culture
},
email: user.Email,
twoFactorEnabled: user.TwoFactorEnabled
disableWebsiteIcons: $localStorage.disableWebsiteIcons
};
if (user.Organizations) {
@@ -58,6 +60,15 @@
}).$promise;
};
$scope.optionsSave = function () {
if (!$scope.selfHosted) {
$localStorage.disableWebsiteIcons = cipherService.disableWebsiteIcons = $scope.model.disableWebsiteIcons;
$rootScope.vaultCiphers = null;
}
toastr.success('Options have been updated.', 'Success!');
};
$scope.changePassword = function () {
$uibModal.open({
animation: true,