hide "on lock" option for firefox and edge

This commit is contained in:
Kyle Spearrin 2017-08-31 12:52:03 -04:00
parent ee6fb78583
commit eae2efea67
2 changed files with 7 additions and 2 deletions

View File

@ -4,12 +4,17 @@
.controller('settingsController', function ($scope, $state, SweetAlert, utilsService, $analytics,
i18nService, constantsService, cryptoService, lockService) {
utilsService.initListSectionItemListeners($(document), angular);
$scope.showOnLocked = !utilsService.isFirefox() && !utilsService.isEdge();
$scope.lockOption = '';
$scope.i18n = i18nService;
chrome.storage.local.get(constantsService.lockOptionKey, function (obj) {
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 {
$scope.lockOption = '';

View File

@ -18,7 +18,7 @@
<option value="30">{{i18n.thirtyMinutes}}</option>
<option value="60">{{i18n.oneHour}}</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="">{{i18n.never}}</option>
</select>