mirror of https://github.com/BTCPrivate/copay.git
add avance settings
This commit is contained in:
parent
c9cf075789
commit
5c3b65c38b
|
@ -21,9 +21,9 @@
|
|||
<i class="icon-arrow-right3 size-24 right text-gray"></i>
|
||||
<span translate>Backup</span>
|
||||
</li>
|
||||
<li class="line-b p20" ng-click="$root.go('delete')">
|
||||
<li class="line-b p20" ng-click="$root.go('preferencesAdvanced')">
|
||||
<i class="icon-arrow-right3 size-24 right text-gray"></i>
|
||||
<span translate>Delete</span>
|
||||
<span translate>Advanced</span>
|
||||
</li>
|
||||
|
||||
<h4 class="title m0" translate>Global settings</h4>
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
<div class="content preferences" ng-controller="preferencesAdvancedController as preferences">
|
||||
|
||||
<ul class="no-bullet m0 size-14">
|
||||
<li class="line-b p20" ng-click="index.retryScan(); $root.go('walletHome'); ">
|
||||
<span translate>Scan addresses for funds</span>
|
||||
</li>
|
||||
|
||||
<li class="line-b p20" ng-click="$root.go('delete')">
|
||||
<i class="icon-arrow-right3 size-24 right text-gray"></i>
|
||||
<span translate>Delete Wallet</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="extra-margin-bottom"></div>
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
</span>
|
||||
</div>
|
||||
<div class="columns text-center m10t">
|
||||
<p translate class="size-12 text-gray">Permanently delete this wallet. WARNING: this action cannot be reversed.</p>
|
||||
<p translate class="size-14 text-gray">Permanently delete this wallet. THIS ACTION CANNONT BE REVERSED</p>
|
||||
<button class="button expand warning" ng-click="preferences.deleteWallet()" translate>
|
||||
Delete wallet
|
||||
</button>
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('preferencesAdvancedController',
|
||||
function($scope) {
|
||||
this.scan = function() {
|
||||
};
|
||||
});
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -53,8 +53,8 @@ angular
|
|||
try {
|
||||
if (window.cordova)
|
||||
console.log(args.join(' '));
|
||||
orig.apply(null, args);
|
||||
historicLog.add(level, args.join(' '));
|
||||
orig.apply(null, args);
|
||||
} catch (e) {
|
||||
console.log('Error at log decorator:', e);
|
||||
}
|
||||
|
@ -279,6 +279,24 @@ angular
|
|||
}
|
||||
}
|
||||
})
|
||||
.state('preferencesAdvanced', {
|
||||
url: '/preferencesAdvanced',
|
||||
templateUrl: 'views/preferencesAdvanced.html',
|
||||
walletShouldBeComplete: true,
|
||||
needProfile: true,
|
||||
views: {
|
||||
'main': {
|
||||
templateUrl: 'views/preferencesAdvanced.html'
|
||||
},
|
||||
'topbar': {
|
||||
templateUrl: 'views/includes/topbar.html',
|
||||
controller: function($scope) {
|
||||
$scope.titleSection = 'Advanced';
|
||||
$scope.goBackToState = 'preferences';
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
.state('preferencesColor', {
|
||||
url: '/preferencesColor',
|
||||
templateUrl: 'views/preferencesColor.html',
|
||||
|
@ -348,8 +366,9 @@ angular
|
|||
'topbar': {
|
||||
templateUrl: 'views/includes/topbar.html',
|
||||
controller: function($scope, gettext) {
|
||||
$scope.titleSection = gettext('Delete');
|
||||
$scope.titleSection = gettext('Delete Wallet');
|
||||
$scope.goBackToState = 'preferences';
|
||||
$scope.goBackToState = 'preferencesAdvanced';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -490,7 +509,8 @@ angular
|
|||
preferences: 0,
|
||||
preferencesColor: 12,
|
||||
backup: 12,
|
||||
delete: 12,
|
||||
preferencesAdvanced: 12,
|
||||
delete: 13,
|
||||
preferencesLanguage: 12,
|
||||
preferencesUnit: 12,
|
||||
preferencesAltCurrency: 12,
|
||||
|
@ -510,7 +530,6 @@ angular
|
|||
});
|
||||
|
||||
$rootScope.$on('$stateChangeStart', function(event, toState, toParams, fromState, fromParams) {
|
||||
|
||||
if (pageWeight[fromState.name] > pageWeight[toState.name]) {
|
||||
$rootScope.$emit('Animation/SwipeRight');
|
||||
} else if (pageWeight[fromState.name] < pageWeight[toState.name]) {
|
||||
|
@ -533,12 +552,13 @@ angular
|
|||
}
|
||||
} else {
|
||||
$log.debug('Profile loaded ... Starting UX.');
|
||||
$state.transitionTo(toState, toParams);
|
||||
$state.transitionTo(toState.name || toState, toParams);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (profileService.focusedClient && !profileService.focusedClient.isComplete() && toState.walletShouldBeComplete) {
|
||||
|
||||
$state.transitionTo('copayers');
|
||||
event.preventDefault();
|
||||
}
|
||||
|
|
|
@ -47,7 +47,6 @@ angular.module('copayApp.services').factory('go', function($window, $rootScope,
|
|||
|
||||
root.walletHome = function() {
|
||||
var fc = profileService.focusedClient;
|
||||
|
||||
if (fc && !fc.isComplete()) {
|
||||
root.path('copayers');
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue