wallet sidebar for mobile

This commit is contained in:
Gustavo Maximiliano Cortez 2014-12-04 17:50:04 -03:00
commit c87f8a1911
7 changed files with 129 additions and 152 deletions

View file

@ -25,9 +25,9 @@
.main { .main {
height: 92%; height: 92%;
margin-top: 40px; margin-top: 30px;
margin-left: 0; margin-left: 0;
margin-bottom: -40px; margin-bottom: -30px;
padding: 20px 0 80px 0; padding: 20px 0 80px 0;
} }
@ -53,6 +53,17 @@
line-height: 110%; line-height: 110%;
} }
header h1 {
color: #fff;
text-align: center;
}
header h1.left-sidebar {
margin: 5px 10px;
text-align: left;
font-size: 16px;
}
.col3 a { .col3 a {
height: 45px; height: 45px;
padding: 12px 5px; padding: 12px 5px;
@ -63,6 +74,10 @@
left: 0; left: 0;
} }
.right-off-canvas-menu {
background-color: #213140 ;
}
.left-off-canvas-menu { .left-off-canvas-menu {
background: #E4E8EC; background: #E4E8EC;
line-height: 24px; line-height: 24px;
@ -178,11 +193,6 @@
font-size: 14px; font-size: 14px;
} }
.top-balance {
width: auto;
padding: 0 5px;
}
a.missing-copayers { a.missing-copayers {
bottom: -34px; bottom: -34px;
text-align: center; text-align: center;
@ -206,13 +216,6 @@
margin-bottom: 50px; margin-bottom: 50px;
} }
.side-nav.wallets {
padding: 0;
height: 100%;
left: 0;
top: 45px;
}
ul.off-canvas-list li a:hover { ul.off-canvas-list li a:hover {
background: transparent; background: transparent;
} }
@ -222,6 +225,18 @@
padding: 0.15rem 0.2rem; padding: 0.15rem 0.2rem;
} }
.side-nav.wallets {
z-index: 100;
overflow-y: inherit;
position: inherit;
height: auto;
border-bottom: none;
}
.photo-container {
margin-right: 5px;
}
} }
@media (max-width: 640px) { @media (max-width: 640px) {

View file

@ -60,18 +60,13 @@
<section class="left-small"> <section class="left-small">
<a class="left-off-canvas-toggle menu-icon" ><span></span></a> <a class="left-off-canvas-toggle menu-icon" ><span></span></a>
</section> </section>
<section class="right-small text-center top-balance" ng-if="$root.wallet && $root.wallet.isComplete() && !$root.wallet.isLocked" > <section class="right-small" >
<span ng-if="$root.updatingBalance"> <a class="right-off-canvas-toggle p10"><i class="icon-wallet size-21"></i></a>
<i class="fi-bitcoin-circle icon-rotate spinner"></i>
</span>
<span class="size-14" ng-if="!$root.updatingBalance">
{{$root.wallet.balanceInfo.totalBalance || 0}} {{$root.wallet.settings.unitName}}
</span>
</section> </section>
<section class="middle tab-bar-section"> <section class="middle tab-bar-section">
<h1 class="title ellipsis"> <h1 class="title">
{{$root.wallet.getName()}} <img src="img/logo-negative-beta.svg" alt="Copay" width="60">
</h1> </h1>
</section> </section>
</nav> </nav>
@ -80,6 +75,10 @@
<div ng-include="'views/includes/sidebar-mobile.html'"></div> <div ng-include="'views/includes/sidebar-mobile.html'"></div>
</aside> </aside>
<aside class="right-off-canvas-menu" ng-if="$root.iden">
<div ng-include="'views/includes/walletbar-mobile.html'"></div>
</aside>
<div notifications="right top"></div> <div notifications="right top"></div>
<div <div

View file

@ -61,7 +61,7 @@ angular.module('copayApp.controllers').controller('SidebarController', function(
}); });
} }
// wallet list chane // wallet list change
if ($rootScope.iden) { if ($rootScope.iden) {
var iden = $rootScope.iden; var iden = $rootScope.iden;
iden.on('newWallet', function() { iden.on('newWallet', function() {

View file

@ -9,11 +9,13 @@
<div class="large-12 columns"> <div class="large-12 columns">
<div class="panel oh"> <div class="panel oh">
<div class="row"> <div class="row">
<div class="large-8 medium-6 small-3 columns"> <div class="large-8 medium-6 small-12 columns">
<div class="ellipsis oh">
<div class="avatar-wallet left">{{$root.wallet.getName() | limitTo: 1}}</div> <div class="avatar-wallet left">{{$root.wallet.getName() | limitTo: 1}}</div>
<h2 class="ellipsis m10t left hide-for-small-only">{{$root.wallet.getName()}}</h2> <h2 class="m10t left">{{$root.wallet.getName()}}</h2>
</div> </div>
<div class="large-4 medium-6 small-9 columns"> </div>
<div class="large-4 medium-6 small-12 columns">
<div class="text-right"> <div class="text-right">
<span class="size-21"> <span class="size-21">
<strong> <strong>

View file

@ -1,88 +1,18 @@
<div ng-controller="SidebarController" ng-init="init()"> <div ng-controller="SidebarController" ng-init="username = $root.iden.getName()">
<header> <header>
<div ng-click="toggleWalletSelection()" ng-if="$root.wallet"> <h1 class="left-sidebar">
<div class="col1"> <span class="photo-container m20r">
<div class="avatar-wallet">{{$root.wallet.getName() | limitTo: 1}}</div>
</div>
<div class="col2">
<div class="oh m5t m10r">
<div class="right size-10 text-white">[ {{$root.wallet.requiredCopayers}} of {{$root.wallet.totalCopayers}} ]</div>
<div class="name-wallet">
<div class="ellipsis">{{$root.wallet.getName()}}</div>
</div>
</div>
<div class="founds size-12">
<span ng-if="!$root.wallet.isComplete()">Waiting for copayers...</span>
<div ng-if="$root.wallet.isComplete()">
<span ng-if="$root.wallet.balanceInfo.updatingBalance"><i class="fi-bitcoin-circle icon-rotate spinner"></i></span>
<div ng-if="$root.wallet && !$root.wallet.balanceInfo.updatingBalance" data-options="disable_for_touch:true">
<b class="m5r">{{$root.wallet.balanceInfo.totalBalance || 0}} {{$root.wallet.settings.unitName}}</b>
<span ng-if="$root.wallet.balanceInfo.alternativeBalanceAvailable" class="alt-currency">{{$root.wallet.balanceInfo.totalBalanceAlternative}} {{$root.wallet.balanceInfo.alternativeIsoCode}}</span>
<span ng-if="!$root.wallet.balanceInfo.alternativeBalanceAvailable" class="alt-currency">N/A</span>
</div>
</div>
</div>
</div>
<div class="col3">
<a ng-class="{'selected':walletSelection}">
<span ng-show="!walletSelection">
<i class="icon-arrow-down2"></i>
</span>
<span ng-show="walletSelection">
<i class="icon-arrow-up2"></i>
</span>
</a>
</div>
</div>
<div ng-show="walletSelection">
<div class="side-nav wallets text-center off-canvas-list" ng-show="!wallets[0]">
<p class="size-12 text-gray m10t" translate>You do not have another wallets.</p>
<a href="#!/create" class="db button secondary tiny" title="Create new wallet">
<i class="m10r fi-plus"></i> {{'Create new wallet' | translate }} </a>
</div>
<ul class="side-nav wallets off-canvas-list" ng-show="wallets[0]">
<li data-ng-repeat="item in wallets track by $index"
class="nav-item"
ng-if="item.id != $root.wallet.id"
ng-click="toggleWalletSelection(); switchWallet(item.id)">
<div class="col1">
<div class="avatar-wallet">{{(item.name || item.id) | limitTo: 1}}</div>
</div>
<div class="col2">
<a class="size-12 wallet-item">
<div class="oh">
<div class="right size-10 type-wallet">
[ {{item.requiredCopayers}} of {{item.totalCopayers}} ]</div>
<div class="ellipsis name-wallet">{{item.name || item.id}}</div>
</div>
<div class="oh">
<span ng-if="item.isComplete() && item.balanceInfo.updatingBalance"><i class="fi-bitcoin-circle icon-rotate spinner"></i></span>
<div ng-if="item.isComplete() && !item.balanceInfo.updatingBalance" data-options="disable_for_touch:true">
<b class="m5r size-12">{{item.balanceInfo.totalBalance || 0}} {{item.settings.unitName}}</b>
<span class="alt-currency size-10">{{item.balanceInfo.totalBalanceAlternative}} {{item.balanceInfo.alternativeIsoCode}}</span>
</div>
<span ng-if="!item.isComplete()">Waiting for copayers...</span>
</div>
</a>
</div>
</li>
</ul>
</div>
</header>
<div ng-show="!walletSelection" ng-init="username = $root.iden.getName()">
<div class="off-canvas-list">
<a href="#!/profile" class="columns text-center m10v" title="Profile">
<div class="photo-container">
<img gravatar-src="'{{username}}'" gravatar-size="35"> <img gravatar-src="'{{username}}'" gravatar-size="35">
</div>
<p class="text-black m5">{{username}}</p>
<span class="db text-gray size-10" >
<i class="fi-torso"></i> {{'ViewProfile' | translate }}
</span> </span>
<span class="m5t">{{username}}</span>
</h1>
</header>
<ul class="off-canvas-list">
<li>
<a href="#!/profile" class="db p20h nav-item" title="Profile">
<i class="size-24 m20r fi-torso"></i> {{'My profile' | translate }}
</a> </a>
</div> </li>
<ul class="off-canvas-list columns">
<li> <li>
<a href="#!/create" class="db p20h nav-item" title="Create new wallet"> <a href="#!/create" class="db p20h nav-item" title="Create new wallet">
<i class="size-24 m20r fi-plus"></i> {{'Create new wallet' | translate }} </a> <i class="size-24 m20r fi-plus"></i> {{'Create new wallet' | translate }} </a>
@ -110,6 +40,5 @@
<div class="text-gray size-12 text-center columns"> <div class="text-gray size-12 text-center columns">
<div ng-include="'views/includes/version.html'"></div> <div ng-include="'views/includes/version.html'"></div>
</div> </div>
</div>
</div> </div>

View file

@ -0,0 +1,36 @@
<div ng-controller="SidebarController" ng-init="init()">
<header>
<h1>My wallets</h1>
</header>
<div class="side-nav text-center off-canvas-list" ng-show="!wallets[0]">
<p class="size-12 text-gray m10t" translate>You do not have another wallets.</p>
<a href="#!/create" class="db button secondary tiny" title="Create new wallet">
<i class="m10r fi-plus"></i> {{'Create new wallet' | translate }} </a>
</div>
<ul class="side-nav wallets off-canvas-list" ng-show="wallets[0]">
<li data-ng-repeat="item in wallets track by $index"
class="nav-item"
ng-click="switchWallet(item.id)">
<div class="col1">
<div class="avatar-wallet">{{(item.name || item.id) | limitTo: 1}}</div>
</div>
<div class="col2">
<a href class="size-12 wallet-item">
<div class="oh">
<div class="right size-10 type-wallet">
[ {{item.requiredCopayers}} of {{item.totalCopayers}} ]</div>
<div class="ellipsis name-wallet">{{item.name || item.id}}</div>
</div>
<div class="oh">
<span ng-if="item.isComplete() && item.balanceInfo.updatingBalance"><i class="fi-bitcoin-circle icon-rotate spinner"></i></span>
<div ng-if="item.isComplete() && !item.balanceInfo.updatingBalance" data-options="disable_for_touch:true">
<b class="m5r size-12">{{item.balanceInfo.totalBalance || 0}} {{item.settings.unitName}}</b>
<span class="alt-currency size-10">{{item.balanceInfo.totalBalanceAlternative}} {{item.balanceInfo.alternativeIsoCode}}</span>
</div>
<span ng-if="!item.isComplete()">Waiting for copayers...</span>
</div>
</a>
</div>
</li>
</ul>
</div>

View file

@ -8,8 +8,7 @@
<div class="row"> <div class="row">
<!-- Address--> <!-- Address-->
<div class="large-12 columns" ng-if="addr"> <div class="large-12 columns" ng-if="addr">
<div class="panel oh"> <div class="panel">
<div class="row">
<h2 class="line-b" translate>My Bitcoin address:</h2> <h2 class="line-b" translate>My Bitcoin address:</h2>
<div class="text-center" ng-if="!loading"> <div class="text-center" ng-if="!loading">
<qrcode size="220" data="bitcoin:{{addr}}"></qrcode> <qrcode size="220" data="bitcoin:{{addr}}"></qrcode>
@ -20,15 +19,12 @@
<div class="text-center" ng-if="loading"> <div class="text-center" ng-if="loading">
Generating new address... Generating new address...
</div> </div>
</div> <div class="line-t m10t size-12">
<div class="row">
<div class="large-12 columns line-t m10t size-12">
Share this with anyone to have them send you payments. To protect your privacy, new addresses are generated automatically once you use them. Share this with anyone to have them send you payments. To protect your privacy, new addresses are generated automatically once you use them.
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div>
<div class="row"> <div class="row">
<div class="large-12 columns" ng-if="addresses.length"> <div class="large-12 columns" ng-if="addresses.length">
<div ng-repeat="addr in addresses"> <div ng-repeat="addr in addresses">