add avance settings

This commit is contained in:
Matias Alejo Garcia 2015-05-04 12:23:43 -03:00
commit 5c3b65c38b
10 changed files with 71 additions and 26 deletions

View file

@ -110,9 +110,9 @@ angular.module('copayApp.controllers').controller('indexController', function($r
if (self.tab === tab && !reset)
return;
if (! document.getElementById('menu-' + tab) && ++tries<5) {
if (!document.getElementById('menu-' + tab) && ++tries < 5) {
return $timeout(function() {
self.setTab(tab,reset, tries);
self.setTab(tab, reset, tries);
}, 300);
}
@ -564,7 +564,10 @@ angular.module('copayApp.controllers').controller('indexController', function($r
self.debouncedUpdate = lodash.throttle(function() {
self.updateAll();
self.updateTxHistory();
}, 4000, {leading: false, trailing: true});
}, 4000, {
leading: false,
trailing: true
});
// No need ot listing to Local/Resume since
@ -578,14 +581,19 @@ angular.module('copayApp.controllers').controller('indexController', function($r
$rootScope.$on('Local/Online', function(event) {
self.isOffline = false;
self.offLineSince = null;
});
self.offLineSince = null;;
$rootScope.$on('Local/Offline', function(event) {
$log.debug('### Offline event');
self.isOffline = true;
$timeout(function() {
$rootScope.$apply();
});
if (!self.offLineSince) self.offLineSince = Date.now();
if (Date.now() - sef.offLineSince > 1000) {
self.isOffline = true;
$timeout(function() {
$rootScope.$apply();
});
}
});
$rootScope.$on('Local/BackupDone', function(event) {
@ -629,9 +637,10 @@ angular.module('copayApp.controllers').controller('indexController', function($r
});
$rootScope.$on('Local/WalletImported', function(event, walletId) {
storageService.setBackupFlag(walletId, function() {});
storageService.clearLastAddress(walletId, function(err) {
self.startScan(walletId);
storageService.setBackupFlag(walletId, function() {
storageService.clearLastAddress(walletId, function(err) {
self.startScan(walletId);
});
});
});

View file

@ -2,9 +2,6 @@
angular.module('copayApp.controllers').controller('preferencesController',
function($scope, $rootScope, $filter, $timeout, $modal, $log, lodash, configService, profileService) {
this.error = null;
this.success = null;
var config = configService.getSync();
this.unitName = config.wallet.settings.unitName;

View file

@ -0,0 +1,7 @@
'use strict';
angular.module('copayApp.controllers').controller('preferencesAdvancedController',
function($scope) {
this.scan = function() {
};
});

View file

@ -1,12 +1,9 @@
'use strict';
angular.module('copayApp.controllers').controller('preferencesBwsUrlController',
function($scope, $rootScope, $filter, $timeout, $modal, balanceService, notification, backupService, profileService, configService, isMobile, isCordova, go, rateService, applicationService, bwcService) {
function($scope, configService, isMobile, isCordova, go, applicationService ) {
this.isSafari = isMobile.Safari();
this.isCordova = isCordova;
this.hideAdv = true;
this.hidePriv = true;
this.hideSecret = true;
this.error = null;
this.success = null;

View file

@ -23,6 +23,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
this.isRateAvailable = false;
this.showScanner = false;
this.isMobile = isMobile.any();
this.addr = null;
var disableScannerListener = $rootScope.$on('dataScanned', function(event, data) {
self.setForm(data);