Split index.html in many files smaller. New right column when the wallet is ready. Removed templates selector.

This commit is contained in:
Gustavo Maximiliano Cortez 2014-07-16 17:59:28 -03:00
commit 0a027360a8
28 changed files with 1394 additions and 1749 deletions

View file

@ -0,0 +1,70 @@
<div ng-controller="BackupController" ng-if='$root.wallet && !$root.wallet.isReady() && !loading'>
<div class="row m10b" ng-if="!$root.wallet.publicKeyRing.isComplete()">
<div class="large-12 medium-12 small-12 columns">
<div class="panel radius m30v">
<h3 class="m15b">Share this secret with your other copayers
</h3>
<div class="row">
<div class="large-9 medium-12 small-12 columns line-dashed-v text-gray">
<div class="panel input">
<p class="ellipsis text-gray">{{$root.wallet.getSecret()}}</p>
</div>
</div>
<div class="large-3 columns hide-for-medium hide-for-small" ng-show="$root.wallet">
<h5 class="m0">{{$root.wallet.getName()}}</h5>
<p class="text-gray">{{$root.wallet.requiredCopayers}}-of-{{$root.wallet.totalCopayers}} wallet</p>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="large-12 medium-12 small-12 columns ">
<div class="box-setup-copayers panel">
<div class="oh">
<h6 class="size-18 m15b">People on this wallet</h6>
<div ng-include="'views/includes/video.html'"></div>
<div class="m10" ng-if="!$root.wallet.publicKeyRing.isComplete()">
<p> <i class="size-60 text-gray fi-bitcoin-circle icon-rotate spinner"></i>Waiting for other copayers to join</p>
</div>
</div>
</div>
</div>
<div class="large-12 medium-12 small-12 columns">
<div class="line-dashed">
<a ng-click="dowloadBackup()"
ng-show="!$root.wallet.publicKeyRing.isComplete()">Download seed backup</a>
<button class="button primary radius right"
ng-click="backup()"
ng-show="!$root.wallet.publicKeyRing.isBackupReady()"
ng-disabled="!$root.wallet.publicKeyRing.isComplete()">
<span ng-show="$root.wallet.publicKeyRing.isComplete()" >
Backup wallet
</span>
<span ng-show="!$root.wallet.publicKeyRing.isComplete()" >
<span ng-show="$root.wallet.publicKeyRing.remainingCopayers() > 1">
{{ $root.wallet.publicKeyRing.remainingCopayers() }} people have
</span>
<span ng-show="$root.wallet.publicKeyRing.remainingCopayers() == 1">
One person has
</span>
yet to join.
</span>
</button>
<button class="button primary radius right"
disabled="disabled"
ng-show="$root.wallet.publicKeyRing.isBackupReady()">
<span ng-show="$root.wallet.publicKeyRing.remainingBackups() > 1">
{{ $root.wallet.publicKeyRing.remainingBackups() }} people have
<span ng-show="$root.wallet.publicKeyRing.remainingBackups() == 1">
One person has
</span>
yet to backup the wallet.
</span>
</button>
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,63 @@
<div ng-controller="SidebarController">
<span class="logo"></span>
Copay <small>v{{version}}</small>
<small>
<a class="text-gray" href="https://copay.io" target="_blank">Project Homapage</a>
</small>
<div>
<strong>{{$root.wallet.getName()}}</strong>
</div>
<div class="size-12 m10t">
{{$root.wallet.requiredCopayers}}-of-{{$root.wallet.totalCopayers}} wallet
<span ng-if="$root.wallet.getNetworkName()=='livenet'">[LIVENET]</span>
<span ng-if="$root.wallet.getNetworkName()=='testnet'">[TESTNET]</span>
</div>
<div>
<a href="/addresses" class="has-tip" tooltip-placement="bottom" tooltip="ID: {{$root.wallet.id}}">
<strong><span>{{$root.wallet.getName()}}</span></strong>
</a>
<a title="Manual Refresh"
ng-disabled="$root.loading"
ng-click="refresh()"><i class="fi-refresh"></i></a>
<a title="Signout"
ng-click="signout()"><i class="fi-power"></i></a>
</div>
<div>
Balance<br class="hide-for-small">
<span ng-if="$root.updatingBalance">
<i class="fi-bitcoin-circle icon-rotate spinner"></i>
</span>
<span ng-if="!$root.updatingBalance"
data-options="disable_for_touch:true"
tooltip="{{totalBalanceBTC || 0 |noFractionNumber:8}} BTC"
tooltip-trigger="mouseenter"
tooltip-placement="bottom">{{totalBalance || 0
|noFractionNumber}} {{$root.unitName}}
</span>
</div>
<div>
Available to Spend<br class="hide-for-small">
<span ng-if="$root.updatingBalance">
<i class="fi-bitcoin-circle icon-rotate spinner"></i>
</span>
<span ng-show="!$root.updatingBalance"
data-options="disable_for_touch:true"
tooltip="{{availableBalanceBTC || 0 |noFractionNumber:8}} BTC"
tooltip-trigger="mouseenter"
tooltip-placement="bottom">{{availableBalance || 0|noFractionNumber}} {{$root.unitName}}
</span>
</div>
<ul class="side-nav">
<li data-ng-repeat="item in menu" ui-route="/{{item.link}}" class="text-center" data-ng-class="{active: isActive(item)}">
<a href="{{item.link}}" ng-click="toggleCollapse()"> <i class="{{item.icon}}"></i> {{item.title}}
<span class="label alert round" ng-if="item.link=='#/transactions' && $root.pendingTxCount > 0">{{$root.pendingTxCount}}</span>
</a>
</li>
</ul>
<div ng-include="'views/includes/video.html'"></div>
</div>

28
views/includes/video.html Normal file
View file

@ -0,0 +1,28 @@
<div
class="bottom-copay"
ng-controller="VideoController"
ng-repeat="c in $root.wallet.getRegisteredPeerIds()"
tooltip="ID: {{c.peerId}}"
tooltip-placement="left">
<video ng-if="$root.videoInfo[c.peerId]"
avatar peer="{{c}}"
autoplay
ng-class="($root.wallet.getOnlinePeerIDs().indexOf(c.peerId) != -1) ? 'online' : 'offline'"
ng-src="{{getVideoURL(c.peerId)}}"
></video>
<img ng-if="!$root.videoInfo[c.peerId]"
avatar peer="{{c}}"
ng-class="($root.wallet.getOnlinePeerIDs().indexOf(c.peerId) != -1) ? 'online' : 'offline'"
src="./img/satoshi.gif"
alt="{{c}}"
/>
<div class="size-12 text-center text-gray">
<span ng-show="c.index==0">you</span>
<span ng-show="c.index>0">{{c.nick}}</span>
<span class="success label" ng-show="$root.wallet.publicKeyRing.isBackupReady(c.copayerId)">
Backup ready
</span>
<small>[ID: {{c.peerId}}]</small>
</div>
</div>