Wallet buttons max width + Receive in viewing wallet.
This commit is contained in:
parent
442f6ba4df
commit
d87c2e65f7
6 changed files with 24 additions and 9 deletions
|
|
@ -233,10 +233,14 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
|
||||||
|
|
||||||
if (!$scope.wallets[0]) return;
|
if (!$scope.wallets[0]) return;
|
||||||
|
|
||||||
// select first wallet if no wallet selected previously
|
var selectedWallet = null;
|
||||||
var selectedWallet = checkSelectedWallet($scope.wallet, $scope.wallets);
|
if (data.stateParams.walletId) { // from walletDetails
|
||||||
|
selectedWallet = checkSelectedWallet(profileService.getWallet(data.stateParams.walletId), $scope.wallets);
|
||||||
|
} else {
|
||||||
|
// select first wallet if no wallet selected previously
|
||||||
|
selectedWallet = checkSelectedWallet($scope.wallet, $scope.wallets);
|
||||||
|
}
|
||||||
$scope.onWalletSelect(selectedWallet);
|
$scope.onWalletSelect(selectedWallet);
|
||||||
|
|
||||||
$scope.showShareButton = platformInfo.isCordova ? (platformInfo.isIOS ? 'iOS' : 'Android') : null;
|
$scope.showShareButton = platformInfo.isCordova ? (platformInfo.isIOS ? 'iOS' : 'Android') : null;
|
||||||
|
|
||||||
listeners = [
|
listeners = [
|
||||||
|
|
|
||||||
|
|
@ -483,4 +483,15 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
||||||
function rgbToHex(r, g, b) {
|
function rgbToHex(r, g, b) {
|
||||||
return "#" + componentToHex(r) + componentToHex(g) + componentToHex(b);
|
return "#" + componentToHex(r) + componentToHex(g) + componentToHex(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$scope.goToReceive = function() {
|
||||||
|
$state.go('tabs.home', {
|
||||||
|
walletId: $scope.wallet.id
|
||||||
|
}).then(function () {
|
||||||
|
$ionicHistory.clearHistory();
|
||||||
|
$state.go('tabs.receive', {
|
||||||
|
walletId: $scope.wallet.id
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -236,7 +236,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.state('tabs.receive', {
|
.state('tabs.receive', {
|
||||||
url: '/receive',
|
url: '/receive/:walletId',
|
||||||
views: {
|
views: {
|
||||||
'tab-receive': {
|
'tab-receive': {
|
||||||
controller: 'tabReceiveController',
|
controller: 'tabReceiveController',
|
||||||
|
|
|
||||||
|
|
@ -70,8 +70,8 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.buttons {
|
.buttons {
|
||||||
margin-bottom: 0;
|
margin: 6px auto 0px;
|
||||||
margin-top: 6px;
|
max-width: 600px;
|
||||||
>.col {
|
>.col {
|
||||||
padding: 5px 10px;
|
padding: 5px 10px;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
|
|
|
||||||
|
|
@ -192,8 +192,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.buttons {
|
.buttons {
|
||||||
margin-bottom: 0;
|
max-width: 600px;
|
||||||
margin-top: 30px;
|
margin: 30px auto 0;
|
||||||
>.col {
|
>.col {
|
||||||
padding: 5px 10px;
|
padding: 5px 10px;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="buttons row" ng-style="{opacity: buttonsOpacity}">
|
<div class="buttons row" ng-style="{opacity: buttonsOpacity}">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<div class="button button-outline button-white-outline" ui-sref="tabs.receive">
|
<div class="button button-outline button-white-outline" ng-click="goToReceive()">
|
||||||
<span translate>Receive</span>
|
<span translate>Receive</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue