mirror of
https://github.com/bitwarden/desktop.git
synced 2024-11-02 08:30:14 +01:00
hide "on lock" option for firefox and edge
This commit is contained in:
parent
ee6fb78583
commit
eae2efea67
@ -4,12 +4,17 @@
|
|||||||
.controller('settingsController', function ($scope, $state, SweetAlert, utilsService, $analytics,
|
.controller('settingsController', function ($scope, $state, SweetAlert, utilsService, $analytics,
|
||||||
i18nService, constantsService, cryptoService, lockService) {
|
i18nService, constantsService, cryptoService, lockService) {
|
||||||
utilsService.initListSectionItemListeners($(document), angular);
|
utilsService.initListSectionItemListeners($(document), angular);
|
||||||
|
$scope.showOnLocked = !utilsService.isFirefox() && !utilsService.isEdge();
|
||||||
$scope.lockOption = '';
|
$scope.lockOption = '';
|
||||||
$scope.i18n = i18nService;
|
$scope.i18n = i18nService;
|
||||||
|
|
||||||
chrome.storage.local.get(constantsService.lockOptionKey, function (obj) {
|
chrome.storage.local.get(constantsService.lockOptionKey, function (obj) {
|
||||||
if (obj && (obj[constantsService.lockOptionKey] || obj[constantsService.lockOptionKey] === 0)) {
|
if (obj && (obj[constantsService.lockOptionKey] || obj[constantsService.lockOptionKey] === 0)) {
|
||||||
$scope.lockOption = obj[constantsService.lockOptionKey].toString();
|
var option = obj[constantsService.lockOptionKey].toString();
|
||||||
|
if (option === '-2' && !$scope.showOnLocked) {
|
||||||
|
option = '-1';
|
||||||
|
}
|
||||||
|
$scope.lockOption = option;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$scope.lockOption = '';
|
$scope.lockOption = '';
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
<option value="30">{{i18n.thirtyMinutes}}</option>
|
<option value="30">{{i18n.thirtyMinutes}}</option>
|
||||||
<option value="60">{{i18n.oneHour}}</option>
|
<option value="60">{{i18n.oneHour}}</option>
|
||||||
<option value="240">{{i18n.fourHours}}</option>
|
<option value="240">{{i18n.fourHours}}</option>
|
||||||
<option value="-2">{{i18n.onLocked}}</option>
|
<option value="-2" ng-if="showOnLocked">{{i18n.onLocked}}</option>
|
||||||
<option value="-1">{{i18n.onRestart}}</option>
|
<option value="-1">{{i18n.onRestart}}</option>
|
||||||
<option value="">{{i18n.never}}</option>
|
<option value="">{{i18n.never}}</option>
|
||||||
</select>
|
</select>
|
||||||
|
Loading…
Reference in New Issue
Block a user