simpler tx history

This commit is contained in:
Matias Alejo Garcia 2014-12-10 22:58:11 -03:00
parent b7da80d2e1
commit 9fcfbeb153
6 changed files with 120 additions and 261 deletions

View File

@ -452,47 +452,17 @@ ul.tx-copayers {
border-bottom: 1px solid #CAD2DA;
}
.last-transactions-header {
background: #2C3E50;
padding: 0.6rem;
color: #fff;
box-shadow: 1.5px 0px 0 0 rgba(32,48,64,1);
-moz-box-shadow: 1.5px 0px 0 0 rgba(32,48,64,1);
-o-box-shadow: 1.5px 0px 0 0 rgba(32,48,64,1);
}
.last-transactions-content {
padding: 0.8rem 0;
color: #7A8C9E;
}
.last-transactions-footer {
background: #E4E8EC;
padding: 0.8rem;
overflow: hidden;
cursor:pointer;
}
.last-transactions-content .box-status {
font-size: 13px;
width: 30px;
}
.last-transactions-content .box-copayer {
width: 100px;
margin-right: 20px;
float: left;
text-align: center;
.last-transactions-content:hover {
background: #eee;
}
.last-transactions-content .copayer-ico {
width: 45px;
height: 45px;
border: 2px solid #7A8C9B;
}
.last-transactions-content .icon-active {
color: #fff;
}
.sign-action {
background: #E4E8EC;

View File

@ -116,11 +116,6 @@
display: none;
}
.reveal-modal, dialog {
padding: 0;
}
.tab-bar h1 {
font-weight: 100;
text-align: center;

View File

@ -13,51 +13,39 @@
</div>
<div class="row" ng-if="blockchain_txs[0].txid">
<div class="large-12 columns">
<div class="panel" ng-repeat="btx in blockchain_txs | orderBy:'-ts'" ng-click="openTxModal(btx)">
<div class="row size-14">
<div class="panel oh">
<div ng-repeat="btx in blockchain_txs | orderBy:'-ts'" ng-click="openTxModal(btx)" ng-class="{'line-b':!$last}" class="last-transactions-content">
<div class="large-2 medium-3 small-4 columns">
<div class="tx-date oh">
<time ng-if="btx.ts">{{btx.ts | amTimeAgo}}</time>
<span class="label alert" ng-show="!btx.ts && (!btx.confirmations || btx.confirmations == 0)">
<span translate>Unconfirmed</span>
</span>
</div>
</div>
<div class="large-4 medium-9 small-8 columns text-right">
<span class="tx-amount " ng-class="{
'text-primary' : btx.action == 'received',
'text-warning': btx.action == 'sent',
'text-gray': btx.action == 'moved'}">
<b>{{btx.amount}} {{$root.wallet.settings.unitName}}</b>
<span class="alt-currency" ng-class="{
'green' : btx.action == 'received',
'red': btx.action == 'sent',
'gray': btx.action == 'moved'}" ng-show="btx.alternativeAmount != null">
{{btx.alternativeAmount}} {{$root.wallet.settings.alternativeIsoCode}}
</span>
<div class="row">
<div class="large-6 medium-6 small-12 columns size-16">
<div class="ellipsis m10b">
<time ng-if="btx.ts">{{btx.ts | amTimeAgo}}</time>
<span class="label alert" ng-show="!btx.ts && (!btx.confirmations || btx.confirmations == 0)">
<span translate>Unconfirmed</span>
</span>
<span ng-class="{
'text-primary' : btx.action == 'received',
'text-warning': btx.action == 'sent',
'text-gray': btx.action == 'moved'}">
<i class="m15h" ng-class="{
'fi-arrow-left' : btx.action == 'received',
'fi-arrow-right': btx.action == 'sent',
'fi-loop': btx.action == 'moved'}"></i>
</span>
</div>
<div class="large-6 medium-12 small-12 columns text-gray">
<div class="tx-comment" ng-show="btx.comment">
<i class="fi-comment-quotes"></i> {{btx.comment}}
</div>
</div>
</div>
<div class="large-6 medium-6 small-12 columns">
<div class="text-right" ng-class="{
'text-primary' : btx.action == 'received',
'text-warning': btx.action == 'sent',
'text-gray': btx.action == 'moved'}">
<span class="size-21">
<span ng-if="!$root.updatingBalance">
<span ng-if="btx.action == 'received'">+</span><span ng-if="btx.action == 'sent'">-</span>{{btx.amount}}
</span>
{{$root.wallet.settings.unitName}}
</span>
<span class="size-14 db m5t text-gray">
{{btx.alternativeAmount}} {{$root.wallet.settings.alternativeIsoCode}}
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div ng-show="blockchain_txs[0].txid">
<div class="row">

View File

@ -34,7 +34,7 @@
</div>
<div class="row ">
<div class="large-12 columns line-t m10t">
<div class="right size-10">
<div class="right size-12">
<span ng-if="!$root.wallet.isShared()">Personal Wallet</span>
<span ng-if="$root.wallet.isShared()">
Multisignature wallet [{{$root.wallet.requiredCopayers}} of {{$root.wallet.totalCopayers}} ]

View File

@ -1,102 +1,32 @@
<div class="last-transactions-header row collapse show-for-large-up" ng-init="txIndex = $index">
<div class="large-9 small-7 columns size-14">
<div ng-show="tx.comment">
<i class="fi-comment-quotes size-18 vm"></i>
<span class="text-light">{{tx.comment}}</span>
</div>
</div>
<div class="large-3 small-5 columns text-right">
<span class="date-message">{{tx.createdTs | amCalendar}}</span>
</div>
</div>
<div class="last-transactions-content" ng-click="openTxModal(tx)">
<div class="last-transactions-content" ng-class="{'line-b':!$last}" ng-click="openTxModal(tx)">
<div class="row" ng-repeat="out in tx.outs">
<div class="large-5 medium-5 small-5 columns size-14">
<b>{{out.value}} {{$root.wallet.settings.unitName}}</b>
<span ng-show="out.alternativeAmount" class="alt-currency gray">
{{out.alternativeAmount}} {{out.alternativeIsoCode}}
</span>
</div>
<div class="large-2 medium-2 small-2 columns text-center">
<i class="fi-arrow-right"></i>
</div>
<div class="large-5 medium-5 small-5 columns ellipsis size-12">
<div ng-if="tx.merchant">
<div class="large-6 medium-6 small-12 columns size-16">
<div class="ellipsis m10b">
To:
<span ng-if="tx.merchant">
<span ng-show="tx.merchant.pr.ca"><i class="fi-lock color-greeni"></i> {{tx.merchant.domain}}</span>
<span ng-show="!tx.merchant.pr.ca"><i class="fi-unlock color-yellowi"></i> {{tx.merchant.domain}}</span>
</span>
</span>
<contact address="{{out.address}}" ng-hide="tx.merchant"> </contact>
</div>
<contact address="{{out.address}}" tooltip-popup-delay="500" tooltip tooltip-placement="right" ng-hide="tx.merchant" />
</div>
</div>
</div>
<div class="p10 line-t show-for-large-up" ng-init="myId = $root.wallet.getMyCopayerId()">
<div class="row collapse">
<div class="small-12 columns" ng-show="!tx.sentTs">
<div ng-show="tx.signedBy[myId]">
<button class="secondary left m10r tiny m0 radius" ng-disabled="true"> <i class="fi-check icon-sign check"></i>
<span translate>Signed by me</span>
</button>
</div>
<div ng-show="tx.rejectedBy[myId]">
<button class="warning left m10r tiny m0 radius" ng-disabled="true"> <i class="fi-x icon-sign x"></i>
<span translate>Rejected by me</span>
</button>
</div>
<div ng-show="!tx.signedBy[myId] && !tx.rejectedBy[myId]">
<div class="row">
<div class="large-6 medium-6 small-6 columns text-left">
<button class="button warning tiny m0" ng-click="reject(tx.ntxid)" ng-disabled="loading">
<i class="fi-x icon-sign x"></i> <span translate>Reject</span>
</button>
</div>
<div class="large-6 medium-6 small-6 columns text-right">
<button class="button primary tiny m0" ng-click="sign(tx.ntxid)" ng-disabled="loading">
<i class="fi-check icon-sign check"></i> <span translate>Sign</span>
</button>
</div>
</div>
</div>
<div ng-show="!tx.missingSignatures && !tx.sentTs">
<button class="primary tiny m0" ng-click="broadcast(tx.ntxid)" ng-disabled="loading"> <i class="fi-upload-cloud"></i>
<span translate>Broadcast Transaction</span>
</button>
</div>
<div class="row collapse right show-for-large-up" ng-click="openTxModal(tx)">
<div class="text-gray text-center m10t size-12">
<span ng-show="!tx.finallyRejected && tx.missingSignatures==1">
One signature missing
<i class="icon-arrow-right2 size-18"></i>
</span>
<span ng-show="!tx.finallyRejected && tx.missingSignatures>1">
{{tx.missingSignatures}} signatures missing
<i class="icon-arrow-right2 size-18"></i>
</span>
<span ng-show="!tx.finallyRejected && tx.missingSignatures==0">
Approved
<div class="large-6 medium-6 small-12 columns">
<div class="text-right">
<span class="size-21">
<span ng-if="!$root.updatingBalance">
{{out.value}}
</span>
</div>
{{$root.wallet.settings.unitName}}
</span>
<span class="size-14 db m5t text-gray">
{{out.alternativeAmount}} {{out.alternativeIsoCode}}
</span>
</div>
</div>
</div>
</div>
<div class="row collapse last-transactions-footer hide-for-large-up size-14" ng-click="openTxModal(tx)">
<div class="text-gray text-center">
<span ng-show="!tx.finallyRejected && tx.missingSignatures==1">
<i class="fi-torso"></i>
One signature missing
</span>
<span ng-show="!tx.finallyRejected && tx.missingSignatures>1">
<i class="icon-people"></i>
{{tx.missingSignatures}} signatures missing
</span>
<span ng-show="!tx.finallyRejected && tx.missingSignatures==0">
Approved
</span>
</div>
</div>

View File

@ -1,103 +1,79 @@
<a class="close-reveal-modal" ng-click="cancel()">&#215;</a>
<div class="size-14">
<div class="text-center size-72 m20t">
<div ng-class="{
'text-primary' : btx.action == 'received',
'text-warning': btx.action == 'sent',
'text-gray': btx.action == 'moved'}">
<i ng-class="{
'fi-arrow-left' : btx.action == 'received',
'fi-arrow-right': btx.action == 'sent',
'fi-loop': btx.action == 'moved'}"></i>
</div>
</div>
<div class="text-center" class="m10v">
<div class="tx-amount" ng-class="{
'text-primary' : btx.action == 'received',
'text-warning': btx.action == 'sent',
'text-gray': btx.action == 'moved'}">
<b>{{btx.amount}} {{$root.wallet.settings.unitName}}</b>
<span class="alt-currency" ng-class="{
'green' : btx.action == 'received',
'red': btx.action == 'sent',
'gray': btx.action == 'moved'}" ng-show="btx.alternativeAmount != null">
{{btx.alternativeAmount}} {{$root.wallet.settings.alternativeIsoCode}}
</span>
</div>
</div>
<div class="line-b m10t"></div>
<h2>Transaction Details</h2>
<div class="m20v" ng-show="btx.comment">
<i class="fi-comment-quotes"></i> {{btx.comment}}
</div>
<div ng-if="btx.ts || btx.createdTs " class="m10v">
<i translate>Date:</i>
<time> <span>{{ (btx.ts || btx.createdTs ) | amCalendar}}</span>
</time>
[
<time>{{ (btx.ts || btx.createdTs ) | amTimeAgo}}</time>]
</div>
<div class="m10v">
<span class="label alert" ng-show="!btx.ts && (!btx.confirmations || btx.confirmations == 0)">
<span translate>Unconfirmed</span>
<div class="text-center size-48 m20t">
<div class="text-right" ng-class="{
'text-primary' : btx.action == 'received',
'text-warning': btx.action == 'sent',
'text-gray': btx.action == 'moved'}">
<span ng-if="btx.action == 'received'">+</span><span ng-if="btx.action == 'sent'">-</span>{{btx.amount}}
{{$root.wallet.settings.unitName}}
<span class="size-18 db m5t text-gray">
{{btx.alternativeAmount}} {{$root.wallet.settings.alternativeIsoCode}}
</span>
<span ng-show="btx.confirmations>0" class="m10v">
<i translate>Confirmations:</i>
<span class="text-gray">{{btx.confirmations}}</span>
</span>
</div>
<div ng-if="btx.addressTo" class="m10v">
<span class="ellipsis">
<i>To:</i>
<span ng-if="btx.merchant">
<span ng-show="btx.merchant.pr.ca"><i class="fi-lock color-greeni"></i> {{btx.merchant.domain}}</span>
<span ng-show="!btx.merchant.pr.ca"><i class="fi-unlock color-yellowi"></i> {{btx.merchant.domain}}</span>
</span>
<span ng-if="!btx.merchant">
<span class="text-gray"> {{btx.labelTo || btx.addressTo}}</span>
</span>
</span>
</div>
<div ng-if="btx.merchant" class="m10v">
{{btx.merchant.pr.pd.memo}}
</div>
<div ng-if="btx.actionList[0]" class="m10v">
<i>Signatures</i>
<ul class="tx-copayers m10t" ng-if="btx.actionList[0]">
<li ng-repeat="c in btx.actionList" ng-class="{'bottom-line-copayers':!$last}">
<span>
<i ng-if="c.actions.rejected" class="fi-x icon-sign x"></i>
<i ng-if="c.actions.sign" class="fi-check icon-sign check"></i>
<i ng-if="!c.actions.sign && !c.actions.rejected && tx.missingSignatures" class="m10r fi-loop icon-rotate"></i>
</span>
<span>
<i ng-if="c.actions.create" class="fi-crown icon-status icon-active m10r"></i>
</span>
<span>{{c.cId === $root.wallet.getMyCopayerId() ? 'Me' : $root.wallet.publicKeyRing.nicknameForCopayer(c.cId)}}</span>
</li>
</ul>
</div>
<div class="m10t oh" ng-if="btx.txid">
<div class="ellipsis text-gray" > ID: {{btx.txid}} </span>
</div>
<a class="right button-setup" ng-click="$root.openExternalLink('http://' + getShortNetworkName() + '.insight.is/tx/' + btx.txid)">
See it on the blockchain <i class="icon-arrow-right2 vm"></i>
</a>
</div>
</div>
<div class="line-b m10t"></div>
<div ng-if="btx.ts || btx.createdTs " class="m10v">
<time >{{ (btx.ts || btx.createdTs ) | amCalendar}}</time>
<time class="text-gray">[ {{ (btx.ts || btx.createdTs ) | amTimeAgo}} ]</time>
</div>
<div class="m10v" ng-show="btx.comment">
<i>Note:</i> {{btx.comment}}
</div>
<div ng-if="btx.addressTo" class="m10v">
<span class="ellipsis">
<i>To:</i>
<span ng-if="btx.merchant">
<span ng-show="btx.merchant.pr.ca"><i class="fi-lock color-greeni"></i> {{btx.merchant.domain}}</span>
<span ng-show="!btx.merchant.pr.ca"><i class="fi-unlock color-yellowi"></i> {{btx.merchant.domain}}</span>
</span>
<span ng-if="!btx.merchant">
<span class="text-gray"> {{btx.labelTo || btx.addressTo}}</span>
</span>
</span>
</div>
<div ng-if="btx.merchant" class="m10v text-gray">
{{btx.merchant.pr.pd.memo}}
</div>
<div class="m10v">
<span class="label alert" ng-show="!btx.ts && (!btx.confirmations || btx.confirmations == 0)">
<span translate>Unconfirmed</span>
</span>
<span ng-show="btx.confirmations>0" class="m10v">
<i translate>Confirmations:</i>
<span class="text-gray">{{btx.confirmations}}</span>
</span>
</div>
<div ng-if="btx.actionList[0]" class="m10v">
<i>Signatures</i>
<ul class="tx-copayers m10t" ng-if="btx.actionList[0]">
<li ng-repeat="c in btx.actionList" ng-class="{'bottom-line-copayers':!$last}" ng-if="c.actions.rejected || c.actions.sign || c.actions.create">
<span>
<i ng-if="c.actions.rejected" class="fi-x icon-sign x"></i>
<i ng-if="c.actions.sign" class="fi-check icon-sign check"></i>
</span>
<span>
<i ng-if="c.actions.create" class="fi-crown icon-status icon-active m10r"></i>
</span>
<span>{{c.cId === $root.wallet.getMyCopayerId() ? 'Me' : $root.wallet.publicKeyRing.nicknameForCopayer(c.cId)}}</span>
</li>
</ul>
</div>
<div class="ellipsis text-gray m10v" ng-if="btx.txid" > ID: {{btx.txid}} </span>
</div>
<div class="oh">
<a class="button-setup right" ng-click="$root.openExternalLink('http://' + getShortNetworkName() + '.insight.is/tx/' + btx.txid)" ng-if="btx.txid">
See it on the blockchain <i class="icon-arrow-right2 vm"></i>
</a>
</div>