Merge pull request #1059 from yemel/feature/change-menu
Refactor menu, split transactions tab into send and history
This commit is contained in:
commit
fe53f1b87c
12 changed files with 235 additions and 209 deletions
|
|
@ -1,7 +1,7 @@
|
|||
<div ng-controller="SidebarController">
|
||||
<header class="text-center">
|
||||
<div class="text-white m10v">
|
||||
<a href="#!/addresses" class="db">
|
||||
<a href="#!/receive" class="db">
|
||||
<img src="img/logo-negative-beta.svg" alt="" width="80">
|
||||
</a>
|
||||
<div ng-include="'views/includes/version.html'"></div>
|
||||
|
|
@ -40,12 +40,12 @@
|
|||
<li data-ng-repeat="item in menu" ui-route="{{item.link}}" class="nav-item" data-ng-class="{active: isActive(item)}">
|
||||
<a href="#!/{{item.link}}" ng-click="toggleCollapse()" class="db p20h">
|
||||
<i class="size-24 m20r {{item.icon}}"></i> {{item.title}}
|
||||
<span class="label alert round" ng-if="item.link=='transactions' && $root.pendingTxCount > 0">{{$root.pendingTxCount}}</span>
|
||||
<span class="label alert round" ng-if="item.link=='send' && $root.pendingTxCount > 0">{{$root.pendingTxCount}}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="db p20h" title="Signout"
|
||||
ng-click="signout()"><i class="size-24 m20r fi-power"></i> Signout</a>
|
||||
<a href="#" class="db p20h" title="Close"
|
||||
ng-click="signout()"><i class="size-24 m20r fi-power"></i> Close</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
<div ng-controller="SidebarController">
|
||||
<header class="p20">
|
||||
<div class="text-center">
|
||||
<a href="#!/addresses" class="db">
|
||||
<a href="#!/receive" class="db">
|
||||
<img src="img/logo-negative-beta.svg" alt="" width="100">
|
||||
</a>
|
||||
<div ng-include="'views/includes/version.html'"></div>
|
||||
</div>
|
||||
<div class="line-sidebar"></div>
|
||||
<div>
|
||||
<a href="#!/addresses" class="name-wallet" tooltip-placement="bottom" tooltip="ID: {{$root.wallet.id}}">
|
||||
<a href="#!/receive" class="name-wallet" tooltip-placement="bottom" tooltip="ID: {{$root.wallet.id}}">
|
||||
<span>{{$root.wallet.getName()}}</span>
|
||||
</a>
|
||||
<a class="button gray small side-bar right" title="Manual Refresh"
|
||||
|
|
@ -50,13 +50,13 @@
|
|||
<a href="#!/{{item.link}}" ng-click="toggleCollapse()" class="db p20h">
|
||||
<i class="size-21 m20r {{item.icon}}"></i> {{item.title}}
|
||||
<span class="right">
|
||||
<span class="label alert" ng-if="item.link=='transactions' && $root.pendingTxCount > 0">{{$root.pendingTxCount}}</span>
|
||||
<span class="label alert" ng-if="item.link=='send' && $root.pendingTxCount > 0">{{$root.pendingTxCount}}</span>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#!/" class="db p20h" title="Signout"
|
||||
ng-click="signout()"><i class="size-21 m20r fi-power"></i> Signout</a>
|
||||
<a href="#!/" class="db p20h" title="Close"
|
||||
ng-click="signout()"><i class="size-21 m20r fi-power"></i> Close</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
|
|
|||
122
views/includes/transaction.html
Normal file
122
views/includes/transaction.html
Normal file
|
|
@ -0,0 +1,122 @@
|
|||
<div class="last-transactions-header">
|
||||
<div class="hide-for-small-only large-1 medium-1 columns">
|
||||
<a class="text-black" ng-show="tx.comment">
|
||||
<i class="fi-comment-quotes size-24" Popover-animation="true" popover="{{$root.wallet.publicKeyRing.nicknameForCopayer(tx.creator)}}" popover-title="{{tx.comment}}" popover-placement="right" popover-trigger="mouseenter"></i>
|
||||
</a>
|
||||
<a class="disable" ng-show="!tx.comment">
|
||||
<i class="fi-comment-quotes size-24 text-gray"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="show-for-small-only small-12 columns m10b" ng-show="tx.comment">
|
||||
<p class="size-14 label" >
|
||||
{{tx.comment}} -
|
||||
{{$root.wallet.publicKeyRing.nicknameForCopayer(tx.creator)}}
|
||||
</p>
|
||||
</div>
|
||||
<div class="large-8 medium-8 small-8 columns">
|
||||
<div ng-repeat="out in tx.outs">
|
||||
<div class="large-3 medium-3 small-3 columns">
|
||||
<p class="size-14 hide-for-small-only">{{out.value | noFractionNumber}} {{$root.unitName}}</p>
|
||||
<p class="size-12 show-for-small-only">{{out.value | noFractionNumber}} {{$root.unitName}}</p>
|
||||
</div>
|
||||
<div class="large-1 medium-1 small-2 columns fi-arrow-right"> </div>
|
||||
<div class="large-8 medium-8 small-7 columns ellipsis">
|
||||
<contact address="{{out.address}}" tooltip-popup-delay="500" tooltip tooltip-placement="right"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="large-3 medium-3 small-4 columns text-right">
|
||||
<p class="size-12">{{tx.createdTs | amCalendar}}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="last-transactions-content">
|
||||
<div class="box-copayer" ng-repeat="c in tx.actionList">
|
||||
<a class="has-tip">
|
||||
<img class="copayer-ico br100" src="./img/satoshi.gif" alt="{{c.cId}}">
|
||||
</a>
|
||||
<div class="box-status">
|
||||
<a ng-if="c.actions.create" tooltip-popup-delay="1000" tooltip="Created {{c.actions.create | amTimeAgo}}">
|
||||
<i class="fi-crown icon-status icon-active"></i>
|
||||
</a>
|
||||
<a ng-if="!c.actions.create"><i class="fi-crown icon-status"></i></a>
|
||||
|
||||
<a ng-if="c.actions.seen" tooltip-popup-delay="1000" tooltip="Seen {{c.actions.seen | amTimeAgo}}">
|
||||
<i class="fi-eye icon-status icon-active"></i>
|
||||
</a>
|
||||
<a ng-if="!c.actions.seen"><i class="fi-eye icon-status"></i></a>
|
||||
|
||||
<a ng-if="c.actions.rejected" tooltip-popup-delay="1000" tooltip="Rejected {{c.actions.rejected | amTimeAgo}}">
|
||||
<i class="fi-x icon-status icon-active-x"></i>
|
||||
</a>
|
||||
|
||||
<a ng-if="c.actions.sign" tooltip-popup-delay="1000" tooltip="Signed {{c.actions.sign | amTimeAgo}}">
|
||||
<i class="fi-check icon-status icon-active-check"></i>
|
||||
</a>
|
||||
|
||||
<a ng-if="!c.actions.sign && !c.actions.rejected" class="icon-status">
|
||||
<i class="fi-loop icon-rotate"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="text-center">
|
||||
<p class="size-12 text-gray ellipsis">
|
||||
{{c.cId === $root.wallet.getMyCopayerId() ? 'Me' : $root.wallet.publicKeyRing.nicknameForCopayer(c.cId)}}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="last-transactions-footer">
|
||||
<div class="large-5 medium-7 small-12 columns" ng-show="!tx.sentTs">
|
||||
<div ng-show="!tx.signedByUs && !tx.rejectedByUs && !tx.finallyRejected && tx.missingSignatures">
|
||||
<div class="hide-for-small-only">
|
||||
<button class="primary m15r" ng-click="sign(tx.ntxid)" ng-disabled="loading" loading="Signing">
|
||||
<i class="fi-check"></i> Sign
|
||||
</button>
|
||||
<button class="warning" ng-click="reject(tx.ntxid)" ng-disabled="loading" loading="Rejecting">
|
||||
<i class="fi-x" ></i> Reject
|
||||
</button>
|
||||
</div>
|
||||
<div class="show-for-small-only row m10b">
|
||||
<button class="primary small-5 columns" ng-click="sign(tx.ntxid)" ng-disabled="loading" loading="Signing">
|
||||
<i class="fi-check"></i> Sign
|
||||
</button>
|
||||
<button class="warning small-5 columns" ng-click="reject(tx.ntxid)" ng-disabled="loading" loading="Rejecting">
|
||||
<i class="fi-x" ></i> Reject
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-show="!tx.missingSignatures && !tx.sentTs">
|
||||
<button class="primary" ng-click="send(tx.ntxid)" ng-disabled="loading" loading="Broadcasting"> <i class=".fi-upload-cloud"></i>
|
||||
Broadcast Transaction
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="large-7 medium-5 small-12 columns text-right">
|
||||
<div ng-show="tx.finallyRejected" class="has-error m10b">
|
||||
Transaction finally rejected
|
||||
</div>
|
||||
<div ng-show="!tx.missingSignatures && tx.sentTs">
|
||||
<div class="is-valid m10b">
|
||||
<strong>Sent</strong> <span class="text-gray" am-time-ago="tx.sentTs"></span>
|
||||
</div>
|
||||
<div class="ellipsis small">
|
||||
Transaction ID:
|
||||
<a href="http://{{getShortNetworkName()}}.insight.is/tx/{{tx.sentTxid}}" target="_blank">
|
||||
{{tx.sentTxid}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-gray m5b" ng-show="!tx.finallyRejected && tx.missingSignatures==1">
|
||||
One signature missing
|
||||
</p>
|
||||
<p class="text-gray m5b" ng-show="!tx.finallyRejected && tx.missingSignatures>1">
|
||||
{{tx.missingSignatures}} signatures missing</p>
|
||||
<div class="ellipsis small text-gray">
|
||||
<strong>Fee:</strong> {{tx.fee|noFractionNumber}} {{$root.unitName}}
|
||||
<strong>Proposal ID:</strong> {{tx.ntxid}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,5 +1,12 @@
|
|||
<div class="send" data-ng-controller="SendController">
|
||||
<div class="send" data-ng-controller="SendController" data-ng-init="loadTxs()">
|
||||
<div ng-show='$root.wallet.isReady()'>
|
||||
|
||||
<h1 ng-show="txs.length != 0">Send Proposals</h1>
|
||||
<div class="last-transactions" ng-repeat="tx in txs | paged">
|
||||
<div ng-include="'views/includes/transaction.html'"></div>
|
||||
</div>
|
||||
<div ng-show="txs.length != 0" class="large-12 line-dashed" style="padding: 0;"></div>
|
||||
|
||||
<h1>{{title}}</h1>
|
||||
<div class="large-6 columns">
|
||||
<form name="sendForm" ng-submit="submitForm(sendForm)" novalidate>
|
||||
|
|
|
|||
|
|
@ -1,138 +1,13 @@
|
|||
<div class="transactions" data-ng-controller="TransactionsController">
|
||||
<div class="transactions" data-ng-controller="TransactionsController" data-ng-init="update()">
|
||||
<div ng-show='$root.wallet.isReady()'>
|
||||
<h1 ng-show="wallet.isShared()"> Transaction proposals <small>({{txs.length}})</small></h1>
|
||||
<h1 ng-show="wallet.isShared()"> Transaction Proposals <small>({{txs.length}})</small></h1>
|
||||
<div class="large-12" ng-show="wallet.isShared()">
|
||||
<ul class="inline-list">
|
||||
<li> <a class="text-gray size-12" ng-click="show(true)" ng-disabled="loading || onlyPending" loading="Updating" ng-class="{'active' : onlyPending}"> [ Pending ] </a> </li>
|
||||
<li> <a class="text-gray size-12" ng-click="show()" ng-disabled="loading || !onlyPending" loading="Updating" ng-class="{'active' : !onlyPending}"> [ All ] </a> </li>
|
||||
</ul>
|
||||
|
||||
<div class="last-transactions" ng-repeat="tx in txs | paged">
|
||||
<div class="last-transactions-header">
|
||||
<div class="hide-for-small-only large-1 medium-1 columns">
|
||||
<a class="text-black" ng-show="tx.comment">
|
||||
<i class="fi-comment-quotes size-24" Popover-animation="true" popover="{{$root.wallet.publicKeyRing.nicknameForCopayer(tx.creator)}}" popover-title="{{tx.comment}}" popover-placement="right" popover-trigger="mouseenter"></i>
|
||||
</a>
|
||||
<a class="disable" ng-show="!tx.comment">
|
||||
<i class="fi-comment-quotes size-24 text-gray"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="show-for-small-only small-12 columns m10b" ng-show="tx.comment">
|
||||
<p class="size-14 label" >
|
||||
{{tx.comment}} -
|
||||
{{$root.wallet.publicKeyRing.nicknameForCopayer(tx.creator)}}
|
||||
</p>
|
||||
</div>
|
||||
<div class="large-8 medium-8 small-8 columns">
|
||||
<div ng-repeat="out in tx.outs">
|
||||
<div class="large-3 medium-3 small-3 columns">
|
||||
<p class="size-14 hide-for-small-only">{{out.value | noFractionNumber}} {{$root.unitName}}</p>
|
||||
<p class="size-12 show-for-small-only">{{out.value | noFractionNumber}} {{$root.unitName}}</p>
|
||||
</div>
|
||||
<div class="large-1 medium-1 small-2 columns fi-arrow-right"> </div>
|
||||
<div class="large-8 medium-8 small-7 columns ellipsis">
|
||||
<contact address="{{out.address}}" tooltip-popup-delay="500" tooltip tooltip-placement="right"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="large-3 medium-3 small-4 columns text-right">
|
||||
<p class="size-12">{{tx.createdTs | amCalendar}}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="last-transactions-content">
|
||||
<div class="box-copayer" ng-repeat="c in tx.actionList">
|
||||
<a href="#!/transactions" class="has-tip">
|
||||
<img class="copayer-ico br100" src="./img/satoshi.gif" alt="{{c.cId}}">
|
||||
</a>
|
||||
<div class="box-status">
|
||||
<a ng-if="c.actions.create" tooltip-popup-delay="1000" tooltip="Created {{c.actions.create | amTimeAgo}}">
|
||||
<i class="fi-crown icon-status icon-active"></i>
|
||||
</a>
|
||||
<a ng-if="!c.actions.create"><i class="fi-crown icon-status"></i></a>
|
||||
|
||||
<a ng-if="c.actions.seen" tooltip-popup-delay="1000" tooltip="Seen {{c.actions.seen | amTimeAgo}}">
|
||||
<i class="fi-eye icon-status icon-active"></i>
|
||||
</a>
|
||||
<a ng-if="!c.actions.seen"><i class="fi-eye icon-status"></i></a>
|
||||
|
||||
<a ng-if="c.actions.rejected" tooltip-popup-delay="1000" tooltip="Rejected {{c.actions.rejected | amTimeAgo}}">
|
||||
<i class="fi-x icon-status icon-active-x"></i>
|
||||
</a>
|
||||
|
||||
<a ng-if="c.actions.sign" tooltip-popup-delay="1000" tooltip="Signed {{c.actions.sign | amTimeAgo}}">
|
||||
<i class="fi-check icon-status icon-active-check"></i>
|
||||
</a>
|
||||
|
||||
<a ng-if="!c.actions.sign && !c.actions.rejected" href="#!/transactions" class="icon-status">
|
||||
<i class="fi-loop icon-rotate"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="text-center">
|
||||
<p class="size-12 text-gray ellipsis">
|
||||
{{c.cId === $root.wallet.getMyCopayerId() ? 'Me' : $root.wallet.publicKeyRing.nicknameForCopayer(c.cId)}}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="last-transactions-footer">
|
||||
<div class="large-5 medium-7 small-12 columns" ng-show="!tx.sentTs">
|
||||
<div ng-show="!tx.signedByUs && !tx.rejectedByUs && !tx.finallyRejected && tx.missingSignatures">
|
||||
<div class="hide-for-small-only">
|
||||
<button class="primary m15r" ng-click="sign(tx.ntxid)" ng-disabled="loading" loading="Signing">
|
||||
<i class="fi-check"></i> Sign
|
||||
</button>
|
||||
<button class="warning" ng-click="reject(tx.ntxid)" ng-disabled="loading" loading="Rejecting">
|
||||
<i class="fi-x" ></i> Reject
|
||||
</button>
|
||||
</div>
|
||||
<div class="show-for-small-only row m10b">
|
||||
<button class="primary small-5 columns" ng-click="sign(tx.ntxid)" ng-disabled="loading" loading="Signing">
|
||||
<i class="fi-check"></i> Sign
|
||||
</button>
|
||||
<button class="warning small-5 columns" ng-click="reject(tx.ntxid)" ng-disabled="loading" loading="Rejecting">
|
||||
<i class="fi-x" ></i> Reject
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-show="!tx.missingSignatures && !tx.sentTs">
|
||||
<button class="primary" ng-click="send(tx.ntxid)" ng-disabled="loading" loading="Broadcasting"> <i class=".fi-upload-cloud"></i>
|
||||
Broadcast Transaction
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="large-7 medium-5 small-12 columns text-right">
|
||||
<div ng-show="tx.finallyRejected" class="has-error m10b">
|
||||
Transaction finally rejected
|
||||
</div>
|
||||
<div ng-show="!tx.missingSignatures && tx.sentTs">
|
||||
<div class="is-valid m10b">
|
||||
<strong>Sent</strong> <span class="text-gray" am-time-ago="tx.sentTs"></span>
|
||||
</div>
|
||||
<div class="ellipsis small">
|
||||
Transaction ID:
|
||||
<a href="http://{{getShortNetworkName()}}.insight.is/tx/{{tx.sentTxid}}" target="_blank">
|
||||
{{tx.sentTxid}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-gray m5b" ng-show="!tx.finallyRejected && tx.missingSignatures==1">
|
||||
One signature missing
|
||||
</p>
|
||||
<p class="text-gray m5b" ng-show="!tx.finallyRejected && tx.missingSignatures>1">
|
||||
{{tx.missingSignatures}} signatures missing</p>
|
||||
<div class="ellipsis small text-gray">
|
||||
<strong>Fee:</strong> {{tx.fee|noFractionNumber}} {{$root.unitName}}
|
||||
<strong>Proposal ID:</strong> {{tx.ntxid}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-include="'views/includes/transaction.html'"></div>
|
||||
</div>
|
||||
<p ng-show="onlyPending && txs.length == 0">No pending transactions proposals.</p>
|
||||
<p ng-show="!onlyPending && txs.length == 0">No transactions proposals yet.</p>
|
||||
<pagination ng-show="!onlyPending && txs.length > txpItemsPerPage" total-items="txs.length" items-per-page="txpItemsPerPage" page="txpCurrentPage" on-select-page="show()" class="pagination-small primary"></pagination>
|
||||
<p ng-show="txs.length == 0">No transactions proposals yet.</p>
|
||||
<pagination ng-show="txs.length > txpItemsPerPage" total-items="txs.length" items-per-page="txpItemsPerPage" page="txpCurrentPage" on-select-page="show()" class="pagination-small primary"></pagination>
|
||||
</div>
|
||||
|
||||
<h1 ng-class="{'line-dashed': wallet.isShared()}">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue