Merge branch 'ref/design' of https://github.com/bitpay/bitpay-wallet into feature/external_link_open_system_browser

# Conflicts:
#	www/views/glidera.html
This commit is contained in:
Jamal Jackson 2016-10-12 08:59:04 -04:00
commit 7becb504f4
59 changed files with 500 additions and 28777 deletions

View file

@ -116,7 +116,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
};
popupService.showPrompt(null, message, opts, function(res) {
if (res) $scope.description = res;
if (typeof res != 'undefined') $scope.description = res;
$timeout(function() {
$scope.$apply();
}, 100);

View file

@ -18,10 +18,20 @@ angular.module('copayApp.controllers').controller('txpDetailsController', functi
$scope.color = $scope.wallet.color;
$scope.data = {};
$scope.hasClick = platformInfo.hasClick;
$scope.displayAmount = getDisplayAmount(tx.amountStr);
$scope.displayUnit = getDisplayUnit(tx.amountStr);
initActionList();
checkPaypro();
}
function getDisplayAmount(amountStr) {
return amountStr.split(' ')[0];
}
function getDisplayUnit(amountStr) {
return amountStr.split(' ')[1];
}
function initActionList() {
$scope.actionList = [];

View file

@ -3,8 +3,8 @@
angular.module('copayApp.controllers').controller('backupWarningController', function($scope, $state, $timeout, $stateParams, $ionicModal) {
$scope.walletId = $stateParams.walletId;
$scope.fromState = $stateParams.from;
$scope.toState = $scope.fromState + ".backup";
$scope.fromState = $stateParams.from == 'onboarding' ? $stateParams.from + '.backupRequest' : $stateParams.from;
$scope.toState = $stateParams.from + '.backup';
$scope.openPopup = function() {
$ionicModal.fromTemplateUrl('views/includes/screenshotWarningModal.html', {

View file

@ -173,6 +173,9 @@ angular.module('copayApp.controllers').controller('tabHomeController',
$scope.hideHomeTip = function() {
storageService.setHomeTipAccepted(false, function(error, value) {
$scope.homeTip = false;
$timeout(function() {
$scope.$apply();
})
});
};

View file

@ -6,6 +6,7 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
var CONTACTS_SHOW_LIMIT;
var currentContactsPage;
var updateList = function() {
CONTACTS_SHOW_LIMIT = 10;
currentContactsPage = 0;
@ -103,11 +104,56 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
});
};
var updateHasFunds = function() {
$scope.hasFunds = null;
var wallets = profileService.getWallets({
onlyComplete: true,
});
if (!wallets || !wallets.length) {
$scope.hasFunds = false;
}
var index = 0;
lodash.each(wallets, function(w) {
walletService.getStatus(w, {}, function(err, status) {
++index;
if (err || !status) {
$log.error(err);
return;
}
if (status.availableBalanceSat) {
$scope.hasFunds = true;
}
if (index == wallets.length) {
$scope.hasFunds = $scope.hasFunds || false;
}
});
});
};
$scope.$on("$ionicView.beforeEnter", function(event, data) {
$scope.formData = {
search: null
};
updateList();
updateHasFunds();
});
// This could probably be enhanced refactoring the routes abstract states
$scope.createWallet = function() {
$state.go('tabs.home').then(function() {
$state.go('tabs.add.create-personal');
});
};
$scope.buyBitcoin = function() {
$state.go('tabs.home').then(function() {
$state.go('tabs.buyandsell.glidera');
});
};
});