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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user