show lock screen at start
This commit is contained in:
parent
e5ecc111f3
commit
6419342c4b
5 changed files with 13 additions and 15 deletions
|
|
@ -54,7 +54,7 @@ angular.module('copayApp.controllers').controller('advancedSettingsController',
|
||||||
|
|
||||||
$scope.usePincodeChange = function() {
|
$scope.usePincodeChange = function() {
|
||||||
pincodeService.lockChange({
|
pincodeService.lockChange({
|
||||||
from: 'settings',
|
fromSettings: true,
|
||||||
locking: $scope.usePincode.enabled
|
locking: $scope.usePincode.enabled
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -15,17 +15,6 @@ angular.module('copayApp.controllers').controller('tabHomeController',
|
||||||
$scope.isNW = platformInfo.isNW;
|
$scope.isNW = platformInfo.isNW;
|
||||||
$scope.showRateCard = {};
|
$scope.showRateCard = {};
|
||||||
|
|
||||||
function openPincodeModal() {
|
|
||||||
$ionicModal.fromTemplateUrl('views/modals/pincode.html', {
|
|
||||||
scope: $scope,
|
|
||||||
backdropClickToClose: false,
|
|
||||||
hardwareBackButtonClose: false
|
|
||||||
}).then(function(modal) {
|
|
||||||
$scope.pincodeModal = modal;
|
|
||||||
$scope.pincodeModal.show();
|
|
||||||
});
|
|
||||||
};
|
|
||||||
// openPincodeModal();
|
|
||||||
$scope.$on("$ionicView.afterEnter", function() {
|
$scope.$on("$ionicView.afterEnter", function() {
|
||||||
startupService.ready();
|
startupService.ready();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1091,11 +1091,20 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.run(function($rootScope, $state, $location, $log, $timeout, $ionicHistory, $ionicPlatform, $window, appConfigService, lodash, platformInfo, profileService, uxLanguage, gettextCatalog, openURLService, storageService, scannerService, /* plugins START HERE => */ coinbaseService, glideraService, amazonService, bitpayCardService) {
|
.run(function($rootScope, $state, $location, $log, $timeout, $ionicHistory, $ionicPlatform, $window, appConfigService, lodash, platformInfo, profileService, uxLanguage, gettextCatalog, openURLService, storageService, scannerService, configService, pincodeService, /* plugins START HERE => */ coinbaseService, glideraService, amazonService, bitpayCardService) {
|
||||||
|
|
||||||
uxLanguage.init();
|
uxLanguage.init();
|
||||||
|
|
||||||
$ionicPlatform.ready(function() {
|
$ionicPlatform.ready(function() {
|
||||||
|
configService.whenAvailable(function(config) {
|
||||||
|
if (config.pincode && config.pincode.enabled) {
|
||||||
|
pincodeService.lockChange({
|
||||||
|
fromSettings: false,
|
||||||
|
locking: false,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if (screen.width < 768 && platformInfo.isCordova)
|
if (screen.width < 768 && platformInfo.isCordova)
|
||||||
screen.lockOrientation('portrait');
|
screen.lockOrientation('portrait');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ angular.module('copayApp.services').factory('pincodeService', function($log, $ro
|
||||||
|
|
||||||
root.lockChange = function(opts) {
|
root.lockChange = function(opts) {
|
||||||
var scope = $rootScope.$new(true);
|
var scope = $rootScope.$new(true);
|
||||||
scope.from = opts.from;
|
scope.fromSettings = opts.fromSettings;
|
||||||
scope.locking = opts.locking;
|
scope.locking = opts.locking;
|
||||||
$ionicModal.fromTemplateUrl('views/modals/pincode.html', {
|
$ionicModal.fromTemplateUrl('views/modals/pincode.html', {
|
||||||
scope: scope,
|
scope: scope,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<ion-modal-view id="pin-code" ng-controller="pincodeController">
|
<ion-modal-view id="pin-code" ng-controller="pincodeController">
|
||||||
<div ng-if="from == 'settings'" ng-click="close()" class="close" translate>Close</div>
|
<div ng-if="fromSettings" ng-click="close()" class="close" translate>Close</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="block-code">
|
<div class="block-code">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue