history section

This commit is contained in:
bechi 2014-10-30 16:46:39 -03:00
parent 9d798a2547
commit 24ea10c36c
6 changed files with 47 additions and 38 deletions

View File

@ -170,7 +170,8 @@ header .alt-currency {
}
.head .menu ul {
border: none;
border-bottom-right-radius: 3px;
border-bottom-left-radius: 3px;
position: absolute;
right: 14px;
width: 100px;
@ -182,7 +183,6 @@ header .alt-currency {
background: #FFFFFF;
-moz-box-shadow: 0px 1px 2px 0px rgba(0,0,0,0.25);
box-shadow: 0px 1px 2px 0px rgba(0,0,0,0.25);
border: none;
}
.head .menu ul li a {
@ -808,10 +808,13 @@ input[type=number]::-webkit-outer-spin-button {
background-color: #1ABC9C;
}
.label {
font-weight: 700;
padding: 0.3rem 0.4rem;
}
.label.alert {
background-color: #C0392A;
padding: 0.3rem 0.4rem;
font-weight: 700;
}
.bg-alert {

View File

@ -195,5 +195,10 @@
height: auto;
}
.label {
font-size: 80%;
padding: 0.15rem 0.2rem;
}
}

View File

@ -62,6 +62,9 @@ angular.module('copayApp.controllers').controller('TransactionsController',
return;
}
_.each(res, function (r) {
r.ts = r.minedTs || r.sentTs;
});
$scope.blockchain_txs = w.cached_txs = res;
$scope.loading = false;
setTimeout(function() {

View File

@ -2854,7 +2854,7 @@ Wallet.prototype.getTransactionHistory = function(cb) {
tx.amountSat = Math.abs(amount);
tx.amount = tx.amountSat * satToUnit;
tx.sentTs = proposal ? proposal.sentTs : undefined;
tx.minedTs = tx.time * 1000;
tx.minedTs = !_.isNaN(tx.time) ? tx.time * 1000 : undefined;
};
if (addresses.length > 0) {
@ -2864,6 +2864,7 @@ Wallet.prototype.getTransactionHistory = function(cb) {
var history = _.map(txs, function(tx) {
decorateTx(tx);
console.log(tx);
return tx;
});
return cb(null, history);

View File

@ -77,7 +77,7 @@
</div>
</li>
</ul>
<a ui-route="{{create}}" href="#!/manage" class="button-setup add-wallet db p20h" title="Create"><i class="m5r fi-plus"></i> {{'Add Wallet' | translate }} </a>
<!-- <a ui-route="{{create}}" href="#!/manage" class="button-setup add-wallet db p20h" title="Create"><i class="m5r fi-plus"></i> {{'Add Wallet' | translate }} </a> -->
</div>
<ul class="side-nav" ng-if="!walletSelection && $root.wallet.isReady()">

View File

@ -30,43 +30,40 @@
<div class="btransactions" ng-if="lastShowed">
<div ng-if="!blockchain_txs[0].txid && !loading">
<em><strong translate>No transactions yet.</strong></em></div>
<div class="last-transactions" ng-repeat="btx in blockchain_txs | orderBy: 'time':true">
<div class="last-transactions-header size-14">
<div class="row collapse">
<div class="large-8 medium-7 small-4 columns ellipsis">
<div class="panel large-12 columns" ng-repeat="btx in blockchain_txs | orderBy: 'time':true">
<div class="row collapse size-12">
<div class="large-2 medium-2 small-4 columns">
<span ng-hide="btx.ts">&nbsp;</span>
<time>{{btx.ts | amCalendar}}</time>
</div>
<div class="large-3 medium-3 small-5 columns">
{{btx.amount| noFractionNumber}} {{$root.wallet.settings.unitName}}
{{btx.action}}
</div>
<div class="large-2 medium-2 columns hide-for-small-only">
<span ng-hide="btx.labelTo">&nbsp;</span>
<span ng-show="btx.labelTo">{{ (btx.action == 'received' ? 'on' : 'to') | translate }} {{btx.labelTo}}</span>
</div>
<div class="large-3 medium-3 small-4 columns hide-for-small-only">
<span ng-show="btx.comment">{{btx.comment}}</span>
</div>
<div class="large-1 medium-1 small-3 columns">
<span class="label alert" ng-show="!btx.confirmations || btx.confirmations == 0"><span translate>Unconfirmed</span></span>
<span class="label" ng-show="btx.confirmations > 0 && btx.confirmations <= 6">{{btx.confirmations || 0}} <span translate>Confirmations</span></span>
<span class="label success" ng-show="btx.confirmations > 6"><span translate>Confirmed</span></span>
</div>
<div class="large-1 medium-1 small-4 columns size-10 text-right hide-for-small-only">
<a href="http://{{getShortNetworkName()}}.insight.is/tx/{{btx.txid}}" target="_blank" translate>
Show more
</a>
<span class="btn-copy" clip-copy="btx.txid"></span>
</div>
<div class="large-4 medium-5 small-8 columns text-right">
<div data-ng-show="btx.sentTs">
<span translate>broadcasted</span>
<time>{{btx.sentTs | amCalendar}}</time>
</div>
<div data-ng-show="btx.minedTs">
<span translate>mined</span>
<time>{{btx.minedTs | amCalendar}}</time>
</div>
</div>
</div>
</div>
<div class="last-transactions-content">
{{btx.action}} <span ng-show="btx.labelTo">{{ (btx.action == 'received' ? 'on' : 'to') | translate }} {{btx.labelTo}}</span>
<span ng-show="btx.comment">{{btx.comment}}</span>
</div>
<div class="last-transactions-footer">
<div class="row collapse">
<div class="large-6 medium-6 small-6 columns">
<div class="size-12" ng-show="!btx.confirmations || btx.confirmations == 0"><span translate>Unconfirmed</span></div>
<div class="size-12" ng-show="btx.confirmations > 0 && btx.confirmations <= 6">{{btx.confirmations || 0}} <span translate>Confirmations</span></div>
<div class="size-12" ng-show="btx.confirmations > 6"><span translate>Confirmed</span></div>
</div>
<div class="large-6 medium-6 small-6 columns text-right">
<p class="label size-14"><span translate>Amount</span>: {{btx.amount| noFractionNumber}} {{$root.wallet.settings.unitName}}</p>
</div>
</div>
</div>
</div>
</div>
</div>