mirror of
https://github.com/bitwarden/browser
synced 2025-12-19 01:33:33 +00:00
Feature settings. i18n of notification bar.
This commit is contained in:
@@ -4,19 +4,9 @@
|
||||
.controller('settingsController', function ($scope, loginService, $state, SweetAlert, utilsService, $analytics,
|
||||
i18nService, constantsService, cryptoService) {
|
||||
utilsService.initListSectionItemListeners($(document), angular);
|
||||
$scope.disableGa = false;
|
||||
$scope.lockOption = '';
|
||||
$scope.i18n = i18nService;
|
||||
|
||||
chrome.storage.local.get(constantsService.disableGaKey, function (obj) {
|
||||
if (obj && obj[constantsService.disableGaKey]) {
|
||||
$scope.disableGa = true;
|
||||
}
|
||||
else {
|
||||
$scope.disableGa = false;
|
||||
}
|
||||
});
|
||||
|
||||
chrome.storage.local.get(constantsService.lockOptionKey, function (obj) {
|
||||
if (obj && (obj[constantsService.lockOptionKey] || obj[constantsService.lockOptionKey] === 0)) {
|
||||
$scope.lockOption = obj[constantsService.lockOptionKey].toString();
|
||||
@@ -121,27 +111,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
$scope.updateGa = function () {
|
||||
chrome.storage.local.get(constantsService.disableGaKey, function (obj) {
|
||||
if (obj[constantsService.disableGaKey]) {
|
||||
// enable
|
||||
obj[constantsService.disableGaKey] = false;
|
||||
}
|
||||
else {
|
||||
// disable
|
||||
$analytics.eventTrack('Disabled Google Analytics');
|
||||
obj[constantsService.disableGaKey] = true;
|
||||
}
|
||||
|
||||
chrome.storage.local.set(obj, function () {
|
||||
$scope.disableGa = obj[constantsService.disableGaKey];
|
||||
if (!obj[constantsService.disableGaKey]) {
|
||||
$analytics.eventTrack('Enabled Google Analytics');
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
$scope.rate = function () {
|
||||
$analytics.eventTrack('Rate Extension');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user