allow wallets to be selected

This commit is contained in:
Marty Alcala 2016-10-12 18:49:00 -04:00
parent de8a660168
commit 252686688e
4 changed files with 73 additions and 57 deletions

View File

@ -118,6 +118,13 @@ angular.module('copayApp.controllers').controller('confirmController', function(
$scope.showWallets = true;
};
$scope.selectWallet = function(w) {
$timeout(function() {
$scope.showWallets = false;
}, 100);
setWallet(w);
};
$scope.showDescriptionPopup = function() {
var message = gettextCatalog.getString('Add description');

View File

@ -1,34 +1,3 @@
// #view-confirm {
// .icon-bitpay-card {
// background-image: url("../img/icon-bitpay.svg");
// }
// .slide-to-pay{
// bottom: 92px;
// }
// .send-gravatar {
// left: 11px;
// position: absolute;
// top: 10px;
// }
// .accept-slide {
// position: fixed;
// bottom: 0;
// width: 100%;
// height: 100px;
// background-color: #647CE8;
// color: #ffffff;
// font-size: 25px;
// text-align: center;
// padding-top: 34px;
// line-height: 32px;
// }
// .accept-slide i {
// float: right;
// font-size: 32px;
// margin-right: 20px;
// }
// }
#view-confirm {
$border-color: #EFEFEF;
height: auto;
@ -52,20 +21,12 @@
}
}
}
.wallet-details {
.wallet-inner {
display: flex;
position: relative;
padding-top: 16px;
padding-bottom: 16px;
.wallet-name {
padding-bottom: 5px;
}
.wallet-balance {
color: #3A3A3A;
font-family: "Roboto-Light";
}
&::after {
display: block;
position: absolute;
@ -76,6 +37,23 @@
right: 0;
content: '';
}
.check {
padding: 0 1.2rem;
}
}
.wallet-details {
flex-grow: 1;
.wallet-name {
padding-bottom: 5px;
}
.wallet-balance {
color: #3A3A3A;
font-family: "Roboto-Light";
}
}
}
}

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="20px" height="17px" viewBox="0 0 20 17" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 40.1 (33804) - http://www.bohemiancoding.com/sketch -->
<title>Icons/Check/Green</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Views/Select-Wallet" transform="translate(-325.000000, -344.000000)" stroke="#12E5B6">
<g id="Componets/Select-Wallet">
<g id="Items/Activity-Cards/Recent-Activity" transform="translate(15.000000, 256.000000)">
<g id="Group-3" transform="translate(0.000000, 60.000000)">
<g id="Icons/Check/Green" transform="translate(311.000000, 29.000000)">
<g id="ui-24px-outline-1_check">
<g id="Group" transform="translate(0.500000, 0.500000)" stroke-width="2">
<polyline id="Shape" points="0 7 7 14 17.5 0"></polyline>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -81,25 +81,32 @@
</slide-to-accept-success>
<action-sheet action-sheet-show="showWallets" class="wallet-selector">
<!-- <div ng-repeat="wallet in wallets">{{wallet.name}}</div> -->
<a ng-repeat="wallet in wallets track by $index" class="item item-icon-left item-big-icon-left item-icon-right wallet" ng-click="openWallet(wallet)">
<a
ng-repeat="w in wallets track by $index"
class="item item-icon-left item-big-icon-left item-icon-right wallet"
ng-click="selectWallet(w)"
>
<i class="icon big-icon-svg">
<img src="img/icon-wallet.svg" ng-style="{'background-color': wallet.color}" class="bg">
<img src="img/icon-wallet.svg" ng-style="{'background-color': w.color}" class="bg">
</i>
<div class="wallet-details">
<div class="wallet-name">
{{wallet.name}}
<div class="wallet-inner">
<div class="wallet-details">
<div class="wallet-name">
{{w.name}}
</div>
<p class="wallet-balance">
<span ng-if="!w.isComplete()" class="assertive" translate>
Incomplete
</span>
<span ng-if="w.isComplete()">
<span ng-if="!w.balanceHidden">{{w.status.availableBalanceStr}}</span>
<span ng-if="w.balanceHidden" translate>[Balance Hidden]</span>
</span>
</span>
&nbsp;
</p>
</div>
<p class="wallet-balance">
<span ng-if="!wallet.isComplete()" class="assertive" translate>
Incomplete
</span>
<span ng-if="wallet.isComplete()">
<span ng-if="!wallet.balanceHidden">{{wallet.status.availableBalanceStr}}</span>
<span ng-if="wallet.balanceHidden" translate>[Balance Hidden]</span>
</span>
</span>
&nbsp;
</p>
<img class="check" src="img/icon-check-selected.svg" ng-show="wallet === w">
</div>
<!-- <i class="icon bp-arrow-right"></i> -->
</a>