Merge branch 'ref/design' of https://github.com/bitpay/bitpay-wallet into feature/address_book
This commit is contained in:
commit
b5a4597416
34 changed files with 132 additions and 112 deletions
|
|
@ -37,7 +37,7 @@ angular.module('copayApp.controllers').controller('addressbookAddController', fu
|
|||
};
|
||||
|
||||
$scope.goHome = function() {
|
||||
$ionicHistory.clearHistory();
|
||||
$ionicHistory.removeBackView();
|
||||
$state.go('tabs.home');
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -3,12 +3,13 @@
|
|||
angular.module('copayApp.controllers').controller('amazonController',
|
||||
function($scope, $timeout, $ionicModal, $log, lodash, bwcError, amazonService, platformInfo, externalLinkService, popupService) {
|
||||
|
||||
$scope.network = amazonService.getEnvironment();
|
||||
|
||||
$scope.openExternalLink = function(url, target) {
|
||||
externalLinkService.open(url, target);
|
||||
};
|
||||
|
||||
var initAmazon = function() {
|
||||
$scope.network = amazonService.getEnvironment();
|
||||
amazonService.getPendingGiftCards(function(err, gcds) {
|
||||
if (err) {
|
||||
popupService.showAlert(err);
|
||||
|
|
@ -82,7 +83,7 @@ angular.module('copayApp.controllers').controller('amazonController',
|
|||
});
|
||||
};
|
||||
|
||||
$scope.$on("$ionicView.enter", function(event, data){
|
||||
$scope.$on("$ionicView.beforeEnter", function(event, data){
|
||||
initAmazon();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -10,7 +10,11 @@ angular.module('copayApp.controllers').controller('amountController', function($
|
|||
var SMALL_FONT_SIZE_LIMIT = 13;
|
||||
var LENGTH_EXPRESSION_LIMIT = 19;
|
||||
|
||||
$scope.$on("$ionicView.enter", function(event, data){
|
||||
$scope.toAddress = $stateParams.toAddress;
|
||||
$scope.toName = $stateParams.toName;
|
||||
$scope.toEmail = $stateParams.toEmail;
|
||||
|
||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||
|
||||
if (!$stateParams.toAddress) {
|
||||
$log.error('Bad params at amount')
|
||||
|
|
@ -46,11 +50,6 @@ angular.module('copayApp.controllers').controller('amountController', function($
|
|||
angular.element($window).off('keydown');
|
||||
});
|
||||
|
||||
|
||||
$scope.toAddress = $stateParams.toAddress;
|
||||
$scope.toName = $stateParams.toName;
|
||||
$scope.toEmail = $stateParams.toEmail;
|
||||
|
||||
var config = configService.getSync().wallet.settings;
|
||||
$scope.unitName = config.unitName;
|
||||
$scope.alternativeIsoCode = config.alternativeIsoCode;
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ angular.module('copayApp.controllers').controller('backupController',
|
|||
if ($stateParams.fromOnboarding) {
|
||||
$state.go('onboarding.disclaimer');
|
||||
} else {
|
||||
$ionicHistory.clearHistory();
|
||||
$ionicHistory.removeBackView();
|
||||
$state.go('tabs.home');
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ angular.module('copayApp.controllers').controller('buyAmazonController',
|
|||
function($scope, $log, $timeout, $state, lodash, profileService, bwcError, gettextCatalog, configService, walletService, amazonService, ongoingProcess, platformInfo, externalLinkService, popupService) {
|
||||
|
||||
var self = this;
|
||||
var network = amazonService.getEnvironment();
|
||||
var wallet;
|
||||
|
||||
$scope.$on('Wallet/Changed', function(event, w) {
|
||||
|
|
@ -20,7 +21,7 @@ angular.module('copayApp.controllers').controller('buyAmazonController',
|
|||
};
|
||||
|
||||
this.confirm = function() {
|
||||
var message = gettextCatalog.getString('Amazon.com Gift Card purchase for ${{amount}} USD', {amount: $scope.fiat});
|
||||
var message = gettextCatalog.getString('Amazon.com Gift Card purchase for ${{amount}} USD', {amount: $scope.formData.fiat});
|
||||
var ok = gettextCatalog.getString('Buy');
|
||||
popupService.showConfirm(null, message, ok, null, function(res) {
|
||||
if (res) self.createTx();
|
||||
|
|
@ -40,7 +41,7 @@ angular.module('copayApp.controllers').controller('buyAmazonController',
|
|||
|
||||
var dataSrc = {
|
||||
currency: 'USD',
|
||||
amount: $scope.fiat,
|
||||
amount: $scope.formData.fiat,
|
||||
uuid: wallet.id
|
||||
};
|
||||
var outputs = [];
|
||||
|
|
@ -209,7 +210,7 @@ angular.module('copayApp.controllers').controller('buyAmazonController',
|
|||
};
|
||||
|
||||
$scope.$on("$ionicView.enter", function(event, data){
|
||||
var network = amazonService.getEnvironment();
|
||||
$scope.formData = { fiat: null };
|
||||
$scope.wallets = profileService.getWallets({
|
||||
network: network,
|
||||
onlyComplete: true
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ angular.module('copayApp.controllers').controller('buyGlideraController',
|
|||
var self = this;
|
||||
this.show2faCodeInput = null;
|
||||
this.success = null;
|
||||
$scope.network = glideraService.getEnvironment();
|
||||
|
||||
$scope.$on('Wallet/Changed', function(event, w) {
|
||||
if (lodash.isEmpty(w)) {
|
||||
|
|
@ -116,9 +117,7 @@ angular.module('copayApp.controllers').controller('buyGlideraController',
|
|||
};
|
||||
|
||||
$scope.$on("$ionicView.enter", function(event, data){
|
||||
$scope.network = glideraService.getEnvironment();
|
||||
|
||||
$scope.token = accessToken;
|
||||
$scope.token = null;
|
||||
$scope.permissions = null;
|
||||
$scope.email = null;
|
||||
$scope.personalInfo = null;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,16 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
|||
var cachedTxp = {};
|
||||
var isChromeApp = platformInfo.isChromeApp;
|
||||
|
||||
$scope.toAddress = $stateParams.toAddress;
|
||||
$scope.toName = $stateParams.toName;
|
||||
$scope.toEmail = $stateParams.toEmail;
|
||||
$scope.description = $stateParams.description;
|
||||
$scope.paypro = $stateParams.paypro;
|
||||
|
||||
$scope.$on("$ionicView.enter", function(event, data) {
|
||||
initConfirm();
|
||||
});
|
||||
|
||||
var initConfirm = function() {
|
||||
if ($stateParams.paypro) {
|
||||
return setFromPayPro($stateParams.paypro, function(err) {
|
||||
|
|
@ -26,12 +36,6 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
|||
var amount = $scope.toAmount = parseInt($stateParams.toAmount);
|
||||
$scope.amountStr = txFormatService.formatAmountStr($scope.toAmount);
|
||||
|
||||
$scope.toAddress = $stateParams.toAddress;
|
||||
$scope.toName = $stateParams.toName;
|
||||
$scope.toEmail = $stateParams.toEmail;
|
||||
$scope.description = $stateParams.description;
|
||||
$scope.paypro = $stateParams.paypro;
|
||||
|
||||
var networkName = (new bitcore.Address($scope.toAddress)).network.name;
|
||||
$scope.network = networkName;
|
||||
|
||||
|
|
@ -309,8 +313,4 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
|||
$scope.cancel = function() {
|
||||
$state.go('tabs.send');
|
||||
};
|
||||
|
||||
$scope.$on("$ionicView.enter", function(event, data) {
|
||||
initConfirm();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -175,12 +175,11 @@ angular.module('copayApp.controllers').controller('createController',
|
|||
if ($scope.seedSource.id == 'set') {
|
||||
profileService.setBackupFlag(client.credentials.walletId);
|
||||
}
|
||||
|
||||
$ionicHistory.removeBackView();
|
||||
if (!client.isComplete()) {
|
||||
$ionicHistory.nextViewOptions({
|
||||
disableAnimate: true
|
||||
});
|
||||
$ionicHistory.removeBackView();
|
||||
$state.go('tabs.home');
|
||||
$timeout(function() {
|
||||
$state.transitionTo('tabs.copayers', {
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ angular.module('copayApp.controllers').controller('exportController',
|
|||
popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Failed to export'));
|
||||
return;
|
||||
}
|
||||
$ionicHistory.clearHistory();
|
||||
$ionicHistory.removeBackView();
|
||||
$state.go('tabs.home');
|
||||
});
|
||||
});
|
||||
|
|
@ -158,7 +158,7 @@ angular.module('copayApp.controllers').controller('exportController',
|
|||
});
|
||||
};
|
||||
|
||||
$scope.$on("$ionicView.enter", function(event, data){
|
||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||
init();
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@
|
|||
angular.module('copayApp.controllers').controller('glideraController',
|
||||
function($scope, $timeout, $ionicModal, $log, storageService, glideraService, ongoingProcess, platformInfo, externalLinkService, popupService, gettextCatalog) {
|
||||
|
||||
$scope.network = glideraService.getEnvironment();
|
||||
|
||||
$scope.openExternalLink = function(url, target) {
|
||||
externalLinkService.open(url, target);
|
||||
};
|
||||
|
||||
var initGlidera = function(accessToken) {
|
||||
$scope.network = glideraService.getEnvironment();
|
||||
|
||||
$scope.token = null;
|
||||
$scope.permissions = null;
|
||||
$scope.email = null;
|
||||
|
|
@ -113,7 +113,7 @@ angular.module('copayApp.controllers').controller('glideraController',
|
|||
});
|
||||
};
|
||||
|
||||
$scope.$on("$ionicView.enter", function(event, data){
|
||||
$scope.$on("$ionicView.beforeEnter", function(event, data){
|
||||
initGlidera();
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -345,6 +345,7 @@ angular.module('copayApp.controllers').controller('importController',
|
|||
if (err) $log.error(err);
|
||||
});
|
||||
}
|
||||
$ionicHistory.removeBackView();
|
||||
$state.go('tabs.home', {
|
||||
fromOnboarding: $stateParams.fromOnboarding
|
||||
});
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ angular.module('copayApp.controllers').controller('joinController',
|
|||
walletService.updateRemotePreferences(client, {}, function() {
|
||||
$log.debug('Remote preferences saved for:' + client.credentials.walletId)
|
||||
});
|
||||
|
||||
$ionicHistory.removeBackView();
|
||||
$state.go('tabs.home');
|
||||
});
|
||||
}, 100);
|
||||
|
|
|
|||
|
|
@ -3,11 +3,14 @@
|
|||
angular.module('copayApp.controllers').controller('txStatusController', function($scope, $timeout, $state, $ionicHistory, $log, addressbookService) {
|
||||
|
||||
if ($scope.cb) $timeout($scope.cb, 100);
|
||||
$scope.fromSendTab = $ionicHistory.viewHistory().backView.stateName === "tabs.send.amount";
|
||||
|
||||
$scope.cancel = function() {
|
||||
$ionicHistory.clearHistory();
|
||||
$state.go('tabs.home');
|
||||
$scope.txStatusModal.hide();
|
||||
if ($scope.fromSendTab) {
|
||||
$ionicHistory.removeBackView();
|
||||
$state.go('tabs.home');
|
||||
}
|
||||
};
|
||||
|
||||
$scope.save = function(addressbookEntry) {
|
||||
|
|
@ -23,7 +26,6 @@ angular.module('copayApp.controllers').controller('txStatusController', function
|
|||
});
|
||||
}
|
||||
|
||||
$scope.fromSendTab = $ionicHistory.viewHistory().backView.stateName === "tabs.send.amount";
|
||||
addressbookService.list(function(err, ab) {
|
||||
if (err) $log.error(err);
|
||||
if (ab[$scope.tx.toAddress]) {
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ angular.module('copayApp.controllers').controller('paperWalletController',
|
|||
popupService.showAlert(gettextCatalog.getString('Error sweeping wallet:'), err || err.toString());
|
||||
} else {
|
||||
$scope.openStatusModal('broadcasted', function() {
|
||||
$ionicHistory.clearHistory();
|
||||
$ionicHistory.removeBackView();
|
||||
$state.go('tabs.home');
|
||||
});
|
||||
}
|
||||
|
|
@ -120,7 +120,7 @@ angular.module('copayApp.controllers').controller('paperWalletController',
|
|||
});
|
||||
};
|
||||
|
||||
$scope.$on("$ionicView.enter", function(event, data){
|
||||
$scope.$on("$ionicView.enter", function(event, data) {
|
||||
var wallet = profileService.getWallet($stateParams.walletId);
|
||||
$scope.wallet = wallet;
|
||||
$scope.isCordova = platformInfo.isCordova;
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ angular.module('copayApp.controllers').controller('paymentUriController',
|
|||
this.selectWallet = function(wid) {
|
||||
var self = this;
|
||||
profileService.setAndStoreFocus(wid, function() {});
|
||||
$ionicHistory.clearHistory();
|
||||
$ionicHistory.removeBackView();
|
||||
$state.go('tabs.home');
|
||||
$timeout(function() {
|
||||
$rootScope.$emit('paymentUri', self.bitcoinURI);
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ angular.module('copayApp.controllers').controller('preferencesController',
|
|||
|
||||
$scope.encryptChange = function() {
|
||||
if (!wallet) return;
|
||||
var val = $scope.encryptEnabled;
|
||||
var val = $scope.encryptEnabled.value;
|
||||
|
||||
if (val && !walletService.isEncrypted(wallet)) {
|
||||
$log.debug('Encrypting private key for', wallet.name);
|
||||
|
|
@ -17,7 +17,7 @@ angular.module('copayApp.controllers').controller('preferencesController',
|
|||
$log.warn(err);
|
||||
|
||||
// ToDo show error?
|
||||
$scope.encryptEnabled = false;
|
||||
$scope.encryptEnabled.value = false;
|
||||
return;
|
||||
}
|
||||
profileService.updateCredentials(JSON.parse(wallet.export()), function() {
|
||||
|
|
@ -31,7 +31,7 @@ angular.module('copayApp.controllers').controller('preferencesController',
|
|||
$log.warn(err);
|
||||
|
||||
// ToDo show error?
|
||||
$scope.encryptEnabled = true;
|
||||
$scope.encryptEnabled.value = true;
|
||||
return;
|
||||
}
|
||||
profileService.updateCredentials(JSON.parse(wallet.export()), function() {
|
||||
|
|
@ -43,10 +43,10 @@ angular.module('copayApp.controllers').controller('preferencesController',
|
|||
};
|
||||
|
||||
$scope.touchIdChange = function() {
|
||||
var newStatus = $scope.touchIdEnabled;
|
||||
var newStatus = $scope.touchIdEnabled.value;
|
||||
walletService.setTouchId(wallet, !!newStatus, function(err) {
|
||||
if (err) {
|
||||
$scope.touchIdEnabled = !newStatus;
|
||||
$scope.touchIdEnabled.value = !newStatus;
|
||||
$timeout(function() {
|
||||
$scope.$apply();
|
||||
}, 1);
|
||||
|
|
@ -56,7 +56,7 @@ angular.module('copayApp.controllers').controller('preferencesController',
|
|||
});
|
||||
};
|
||||
|
||||
$scope.$on("$ionicView.beforeEnter", function(event, data){
|
||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||
$scope.externalSource = null;
|
||||
|
||||
if (!wallet)
|
||||
|
|
@ -64,12 +64,17 @@ angular.module('copayApp.controllers').controller('preferencesController',
|
|||
|
||||
var config = configService.getSync();
|
||||
|
||||
$scope.encryptEnabled = walletService.isEncrypted(wallet);
|
||||
$scope.encryptEnabled = {
|
||||
value: walletService.isEncrypted(wallet)
|
||||
};
|
||||
|
||||
if (wallet.isPrivKeyExternal)
|
||||
$scope.externalSource = wallet.getPrivKeyExternalSourceName() == 'ledger' ? 'Ledger' : 'Trezor';
|
||||
|
||||
$scope.touchIdAvailable = fingerprintService.isAvailable();
|
||||
$scope.touchIdEnabled = config.touchIdFor ? config.touchIdFor[walletId] : null;
|
||||
$scope.touchIdEnabled = {
|
||||
value: config.touchIdFor ? config.touchIdFor[walletId] : null
|
||||
};
|
||||
|
||||
$scope.deleted = false;
|
||||
if (wallet.credentials && !wallet.credentials.mnemonicEncrypted && !wallet.credentials.mnemonic) {
|
||||
|
|
|
|||
|
|
@ -3,18 +3,20 @@
|
|||
angular.module('copayApp.controllers').controller('preferencesAliasController',
|
||||
function($scope, $timeout, $stateParams, $ionicHistory, gettextCatalog, configService, profileService, walletService) {
|
||||
var wallet = profileService.getWallet($stateParams.walletId);
|
||||
$scope.wallet = wallet;
|
||||
var walletId = wallet.credentials.walletId;
|
||||
var config = configService.getSync();
|
||||
|
||||
$scope.walletName = wallet.credentials.walletName;
|
||||
$scope.alias = (config.aliasFor && config.aliasFor[walletId]) || wallet.walletName;
|
||||
$scope.alias = {
|
||||
value: (config.aliasFor && config.aliasFor[walletId]) || wallet.credentials.walletName
|
||||
};
|
||||
|
||||
$scope.save = function() {
|
||||
var opts = {
|
||||
aliasFor: {}
|
||||
};
|
||||
opts.aliasFor[walletId] = $scope.alias;
|
||||
|
||||
opts.aliasFor[walletId] = $scope.alias.value;
|
||||
|
||||
configService.set(opts, function(err) {
|
||||
if (err) $log.warn(err);
|
||||
|
|
|
|||
|
|
@ -9,16 +9,18 @@ angular.module('copayApp.controllers').controller('preferencesBwsUrlController',
|
|||
var defaults = configService.getDefaults();
|
||||
var config = configService.getSync();
|
||||
|
||||
$scope.bwsurl = (config.bwsFor && config.bwsFor[walletId]) || defaults.bws.url;
|
||||
$scope.bwsurl = {
|
||||
value: (config.bwsFor && config.bwsFor[walletId]) || defaults.bws.url
|
||||
};
|
||||
|
||||
$scope.resetDefaultUrl = function() {
|
||||
$scope.bwsurl = defaults.bws.url;
|
||||
$scope.bwsurl.value = defaults.bws.url;
|
||||
};
|
||||
|
||||
$scope.save = function() {
|
||||
|
||||
var bws;
|
||||
switch ($scope.bwsurl) {
|
||||
switch ($scope.bwsurl.value) {
|
||||
case 'prod':
|
||||
case 'production':
|
||||
bws = 'https://bws.bitpay.com/bws/api'
|
||||
|
|
@ -34,13 +36,13 @@ angular.module('copayApp.controllers').controller('preferencesBwsUrlController',
|
|||
};
|
||||
if (bws) {
|
||||
$log.info('Using BWS URL Alias to ' + bws);
|
||||
$scope.bwsurl = bws;
|
||||
$scope.bwsurl.value = bws;
|
||||
}
|
||||
|
||||
var opts = {
|
||||
bwsFor: {}
|
||||
};
|
||||
opts.bwsFor[walletId] = $scope.bwsurl;
|
||||
opts.bwsFor[walletId] = $scope.bwsurl.value;
|
||||
|
||||
configService.set(opts, function(err) {
|
||||
if (err) $log.debug(err);
|
||||
|
|
|
|||
|
|
@ -7,16 +7,18 @@ angular.module('copayApp.controllers').controller('preferencesEmailController',
|
|||
|
||||
var config = configService.getSync();
|
||||
config.emailFor = config.emailFor || {};
|
||||
$scope.email = config.emailFor && config.emailFor[walletId];
|
||||
$scope.email = {
|
||||
value: config.emailFor && config.emailFor[walletId]
|
||||
};
|
||||
|
||||
$scope.save = function(form) {
|
||||
$scope.save = function() {
|
||||
var opts = {
|
||||
emailFor: {}
|
||||
};
|
||||
opts.emailFor[walletId] = $scope.email;
|
||||
opts.emailFor[walletId] = $scope.email.value;
|
||||
|
||||
walletService.updateRemotePreferences(wallet, {
|
||||
email: $scope.email,
|
||||
email: $scope.email.value,
|
||||
}, function(err) {
|
||||
if (err) $log.warn(err);
|
||||
configService.set(opts, function(err) {
|
||||
|
|
|
|||
|
|
@ -125,13 +125,13 @@ angular.module('copayApp.controllers').controller('preferencesHistory',
|
|||
$scope.$emit('Local/ClearHistory');
|
||||
|
||||
$timeout(function() {
|
||||
$ionicHistory.clearHistory();
|
||||
$ionicHistory.removeBackView();
|
||||
$state.go('tabs.home');
|
||||
}, 100);
|
||||
});
|
||||
};
|
||||
|
||||
$scope.$on("$ionicView.enter", function(event, data){
|
||||
$scope.$on("$ionicView.enter", function(event, data) {
|
||||
$scope.csvHistory();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('preferencesInformation',
|
||||
function($scope, $log, $timeout, $ionicHistory, platformInfo, gettextCatalog, lodash, profileService, configService, $stateParams, walletService, $state) {
|
||||
function($scope, $log, $timeout, $ionicHistory, $ionicScrollDelegate, platformInfo, gettextCatalog, lodash, profileService, configService, $stateParams, walletService, $state) {
|
||||
var base = 'xpub';
|
||||
var wallet = profileService.getWallet($stateParams.walletId);
|
||||
var walletId = wallet.id;
|
||||
|
|
@ -65,7 +65,7 @@ angular.module('copayApp.controllers').controller('preferencesInformation',
|
|||
opts.colorFor[walletId] = color;
|
||||
|
||||
configService.set(opts, function(err) {
|
||||
$ionicHistory.clearHistory();
|
||||
$ionicHistory.removeBackView();
|
||||
$state.go('tabs.home');
|
||||
if (err) $log.warn(err);
|
||||
});
|
||||
|
|
@ -77,11 +77,11 @@ angular.module('copayApp.controllers').controller('preferencesInformation',
|
|||
|
||||
$scope.scan = function() {
|
||||
walletService.startScan(wallet);
|
||||
$ionicHistory.clearHistory();
|
||||
$ionicHistory.removeBackView();
|
||||
$state.go('tabs.home');
|
||||
};
|
||||
|
||||
$scope.$on("$ionicView.enter", function(event, data){
|
||||
$scope.$on("$ionicView.enter", function(event, data) {
|
||||
var c = wallet.credentials;
|
||||
var basePath = c.getBaseAddressDerivationPath();
|
||||
|
||||
|
|
@ -116,7 +116,7 @@ angular.module('copayApp.controllers').controller('preferencesInformation',
|
|||
$timeout(function() {
|
||||
$scope.$apply();
|
||||
});
|
||||
|
||||
$ionicScrollDelegate.resize();
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -3,32 +3,33 @@
|
|||
angular.module('copayApp.controllers').controller('preferencesLogs',
|
||||
function($scope, historicLog, gettextCatalog) {
|
||||
|
||||
$scope.prepare = function() {
|
||||
var log = 'Copay Session Logs\n Be careful, this could contain sensitive private data\n\n';
|
||||
log += '\n\n';
|
||||
log += $scope.logs.map(function(v) {
|
||||
return v.msg;
|
||||
}).join('\n');
|
||||
|
||||
return log;
|
||||
};
|
||||
|
||||
$scope.sendLogs = function() {
|
||||
var body = $scope.prepare();
|
||||
|
||||
window.plugins.socialsharing.shareViaEmail(
|
||||
body,
|
||||
'Copay Logs',
|
||||
null, // TO: must be null or an array
|
||||
null, // CC: must be null or an array
|
||||
null, // BCC: must be null or an array
|
||||
null, // FILES: can be null, a string, or an array
|
||||
function() {},
|
||||
function() {}
|
||||
);
|
||||
};
|
||||
|
||||
$scope.$on("$ionicView.enter", function(event, data){
|
||||
$scope.$on("$ionicView.enter", function(event, data) {
|
||||
$scope.logs = historicLog.get();
|
||||
|
||||
$scope.prepare = function() {
|
||||
var log = 'Copay Session Logs\n Be careful, this could contain sensitive private data\n\n';
|
||||
log += '\n\n';
|
||||
log += $scope.logs.map(function(v) {
|
||||
return v.msg;
|
||||
}).join('\n');
|
||||
|
||||
return log;
|
||||
};
|
||||
|
||||
$scope.sendLogs = function() {
|
||||
var body = $scope.prepare();
|
||||
|
||||
window.plugins.socialsharing.shareViaEmail(
|
||||
body,
|
||||
'Copay Logs',
|
||||
null, // TO: must be null or an array
|
||||
null, // CC: must be null or an array
|
||||
null, // BCC: must be null or an array
|
||||
null, // FILES: can be null, a string, or an array
|
||||
function() {},
|
||||
function() {}
|
||||
);
|
||||
};
|
||||
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ angular.module('copayApp.controllers').controller('sellGlideraController',
|
|||
this.show2faCodeInput = null;
|
||||
this.success = null;
|
||||
var wallet;
|
||||
$scope.network = glideraService.getEnvironment();
|
||||
|
||||
$scope.$on('Wallet/Changed', function(event, w) {
|
||||
if (lodash.isEmpty(w)) {
|
||||
|
|
@ -189,9 +190,7 @@ angular.module('copayApp.controllers').controller('sellGlideraController',
|
|||
};
|
||||
|
||||
$scope.$on("$ionicView.enter", function(event, data){
|
||||
$scope.network = glideraService.getEnvironment();
|
||||
|
||||
$scope.token = accessToken;
|
||||
$scope.token = null;
|
||||
$scope.permissions = null;
|
||||
$scope.email = null;
|
||||
$scope.personalInfo = null;
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
|
|||
};
|
||||
|
||||
$scope.$on("$ionicView.enter", function(event, data){
|
||||
$scope.formData = { search: null };
|
||||
updateList();
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -28,10 +28,16 @@ angular.module('copayApp.controllers').controller('tabSettingsController', funct
|
|||
$scope.$digest();
|
||||
});
|
||||
}
|
||||
$scope.spendUnconfirmed = {value : config.wallet.spendUnconfirmed};
|
||||
$scope.glideraEnabled = {value: config.glidera.enabled};
|
||||
$scope.spendUnconfirmed = {
|
||||
value: config.wallet.spendUnconfirmed
|
||||
};
|
||||
$scope.glideraEnabled = {
|
||||
value: config.glidera.enabled
|
||||
};
|
||||
$scope.coinbaseEnabled = config.coinbase.enabled;
|
||||
$scope.pushNotifications = {value: config.pushNotifications.enabled};
|
||||
$scope.pushNotifications = {
|
||||
value: config.pushNotifications.enabled
|
||||
};
|
||||
$scope.otherWallets = lodash.filter(profileService.getWallets(self.network), function(w) {
|
||||
return w.id != self.walletId;
|
||||
});
|
||||
|
|
@ -94,7 +100,7 @@ angular.module('copayApp.controllers').controller('tabSettingsController', funct
|
|||
});
|
||||
};
|
||||
|
||||
$scope.$on("$ionicView.enter", function(event, data){
|
||||
$scope.$on("$ionicView.enter", function(event, data) {
|
||||
updateConfig();
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ angular.module('copayApp.services')
|
|||
if (isChromeApp) {
|
||||
chrome.runtime.reload();
|
||||
} else if (isNW) {
|
||||
$ionicHistory.clearHistory();
|
||||
$ionicHistory.removeBackView();
|
||||
$state.go('tabs.home');
|
||||
$timeout(function() {
|
||||
var win = require('nw.gui').Window.get();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue