wallet selection popup, link to open it
This commit is contained in:
parent
707acfaf64
commit
7433b1b863
5 changed files with 60 additions and 1 deletions
31
public/views/modals/wallets.html
Normal file
31
public/views/modals/wallets.html
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<nav class="tab-bar">
|
||||
<section class="left-small">
|
||||
<a ng-click="cancel()" class="p10">
|
||||
<span class="text-close" translate>Close</span>
|
||||
</a>
|
||||
</section>
|
||||
|
||||
<section class="middle tab-bar-section">
|
||||
<h1 class="title ellipsis" ng-style="{'color':color}" translate>
|
||||
Choose a wallet to send funds
|
||||
</h1>
|
||||
</section>
|
||||
</nav>
|
||||
|
||||
<div class="modal-content">
|
||||
<ul class="no-bullet">
|
||||
<li class="panel" ng-repeat="w in wallets">
|
||||
<a ng-click="payment.selectWallet(w.id)">
|
||||
<div class="avatar-wallet"
|
||||
ng-style="{'background-color':w.color}">{{(w.name || w.id) | limitTo: 1}}</div>
|
||||
<div class="ellipsis">{{w.name || w.id}}</div>
|
||||
<div class="size-12">{{w.m}} of {{w.n}}
|
||||
<span ng-show="w.network=='testnet'">[Testnet]</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="extra-margin-bottom"></div>
|
||||
</div>
|
||||
|
||||
|
|
@ -327,6 +327,11 @@
|
|||
<div ng-hide="home._paypro || home.hideAddress">
|
||||
<div class="row collapse">
|
||||
|
||||
<div class="right size-12 m0 text-gray" ng-click="openWalletsModal(index.otherWallets)" ng-if="index.otherWallets">
|
||||
send to my wallets
|
||||
</div>
|
||||
|
||||
|
||||
<label for="address" class="left" >
|
||||
<span translate>To</span>
|
||||
</label>
|
||||
|
|
|
|||
|
|
@ -285,7 +285,7 @@ a.missing-copayers {
|
|||
background-color: #122232;
|
||||
}
|
||||
|
||||
.sidebar .avatar-wallet, .payment-uri .avatar-wallet {
|
||||
.sidebar .avatar-wallet, .payment-uri .avatar-wallet, .modal-content .avatar-wallet {
|
||||
background-color: #2C3E50;
|
||||
color: #fff;
|
||||
font-size: 20px;
|
||||
|
|
|
|||
|
|
@ -237,6 +237,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
self.copayers = walletStatus.wallet.copayers;
|
||||
self.preferences = walletStatus.preferences;
|
||||
self.setBalance(walletStatus.balance);
|
||||
self.otherWallets = profileService.getWallets(self.network);
|
||||
$rootScope.$apply();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -125,6 +125,28 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
});
|
||||
};
|
||||
|
||||
|
||||
$scope.openWalletsModal = function(wallets) {
|
||||
var fc = profileService.focusedClient;
|
||||
|
||||
var ModalInstanceCtrl = function($scope, $modalInstance) {
|
||||
$scope.wallets = wallets;
|
||||
$scope.cancel = function() {
|
||||
$modalInstance.dismiss('cancel');
|
||||
};
|
||||
};
|
||||
var modalInstance = $modal.open({
|
||||
templateUrl: 'views/modals/wallets.html',
|
||||
windowClass: 'full animated slideInUp',
|
||||
controller: ModalInstanceCtrl,
|
||||
});
|
||||
|
||||
modalInstance.result.finally(function() {
|
||||
var m = angular.element(document.getElementsByClassName('reveal-modal'));
|
||||
m.addClass('slideOutDown');
|
||||
});
|
||||
};
|
||||
|
||||
this.openTxpModal = function(tx, copayers) {
|
||||
var fc = profileService.focusedClient;
|
||||
var refreshUntilItChanges = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue