mirror of https://github.com/BTCPrivate/copay.git
Merge pull request #2192 from cmgustavo/ux/menu-layout
New sidebar on mobile
This commit is contained in:
commit
430240dcfd
|
@ -219,6 +219,7 @@ header .alt-currency {
|
|||
height:100%;
|
||||
}
|
||||
|
||||
|
||||
.tab-bar {
|
||||
display: none;
|
||||
}
|
||||
|
@ -249,11 +250,11 @@ input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill, inpu
|
|||
.side-nav.wallets .avatar-wallet,
|
||||
.wallet-selection.wallets .avatar-wallet
|
||||
{
|
||||
background-color: #7A8C9E;
|
||||
color: #213140;
|
||||
background-color: #1ABC9C;
|
||||
color: #fff;
|
||||
padding: 0.35rem 0.5rem;
|
||||
text-align: center;
|
||||
margin-top: 6px;
|
||||
margin-top: 3px;
|
||||
width: 35px;
|
||||
}
|
||||
|
||||
|
@ -621,6 +622,7 @@ a.button-setup {
|
|||
float: left;
|
||||
color: #fff;
|
||||
text-transform: lowercase;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.name-wallet i {
|
||||
|
|
|
@ -18,13 +18,24 @@
|
|||
display: none;
|
||||
}
|
||||
|
||||
.sidebar-bottom {
|
||||
background: #213140;
|
||||
padding: 1.2rem;
|
||||
font-size: 14px;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
height: 65px;
|
||||
}
|
||||
|
||||
.page, .main {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.main {
|
||||
height: 92%;
|
||||
margin-top: 45px;
|
||||
margin-top: 30px;
|
||||
margin-left: 0;
|
||||
margin-bottom: -30px;
|
||||
padding: 20px 0 80px 0;
|
||||
|
@ -58,7 +69,27 @@
|
|||
|
||||
header {
|
||||
height: 45px;
|
||||
background-color: #213140;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
line-height: 110%;
|
||||
padding: 0 0.45rem;
|
||||
/*
|
||||
padding: 0.45rem;
|
||||
line-height: 110%;
|
||||
background-color: #213140;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
top: 0;
|
||||
*/
|
||||
}
|
||||
|
||||
header .photo-container {
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
margin-right: 10px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
header h1 {
|
||||
|
@ -66,6 +97,22 @@
|
|||
text-align: center;
|
||||
}
|
||||
|
||||
.scroll-section {
|
||||
position: absolute;
|
||||
top: 45px;
|
||||
bottom: 65px;
|
||||
overflow: scroll;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.col2 {
|
||||
width: 180px;
|
||||
}
|
||||
|
||||
.col2 a.wallet-item {
|
||||
padding: 0.15rem 0 0.3rem;
|
||||
}
|
||||
|
||||
.col3 a {
|
||||
height: 45px;
|
||||
padding: 12px 5px;
|
||||
|
@ -94,9 +141,11 @@
|
|||
}
|
||||
|
||||
.avatar-wallet {
|
||||
background-color: #1ABC9C;
|
||||
color: #fff;
|
||||
margin-top: 5px;
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
margin-right: 13px;
|
||||
padding: 0.35rem 0.65rem;
|
||||
}
|
||||
|
||||
|
@ -112,10 +161,6 @@
|
|||
height: 30px;
|
||||
}
|
||||
|
||||
.tab-bar-section {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.setup-page {
|
||||
height: 100%;
|
||||
}
|
||||
|
@ -125,8 +170,10 @@
|
|||
}
|
||||
|
||||
.tab-bar h1 {
|
||||
font-weight: 100;
|
||||
font-weight: 700;
|
||||
text-align: center;
|
||||
text-transform: uppercase;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
ul.off-canvas-list li a {
|
||||
|
@ -218,16 +265,18 @@
|
|||
padding: 0.15rem 0.2rem;
|
||||
}
|
||||
|
||||
.side-nav.wallets {
|
||||
z-index: 100;
|
||||
overflow-y: inherit;
|
||||
position: inherit;
|
||||
height: auto;
|
||||
border-bottom: none;
|
||||
.sidebar-mobile-wallets {
|
||||
background: #E4E8EC;
|
||||
}
|
||||
|
||||
.side-nav li.nav-item.selected {
|
||||
background-color: #3C4E60;
|
||||
.sidebar-mobile-wallets li {
|
||||
overflow: hidden;
|
||||
padding:0.4rem;
|
||||
border-bottom: 1px solid #DDE2E7;
|
||||
}
|
||||
|
||||
.sidebar-mobile-wallets li.nav-item.selected {
|
||||
background-color: #CED5DC;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -258,6 +307,39 @@
|
|||
-webkit-tap-highlight-color:rgba(0,0,0,0);
|
||||
}
|
||||
|
||||
a.button-addwallet {
|
||||
background: #D8DEE3;
|
||||
border-radius: 4px;
|
||||
color: #7A8C9E;
|
||||
text-transform: uppercase;
|
||||
font-weight: 700;
|
||||
font-size: 12px;
|
||||
padding: 0.8rem;
|
||||
width: 80%;
|
||||
display: block;
|
||||
margin: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
a.button-addwallet i {
|
||||
background-color: #7A8C9E;
|
||||
color: #D8DEE3;
|
||||
border-radius: 100%;
|
||||
padding: .1rem 0.25rem;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.add-wallet .button-setup {
|
||||
border: 1px solid #A5B2BF;
|
||||
border-radius: 5px;
|
||||
color: #7A8C9E;
|
||||
text-align: center;
|
||||
padding: 2rem;
|
||||
margin: 2rem 0;
|
||||
text-transform: uppercase;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.modal.fade, .reveal-modal-bg {
|
||||
opacity: 1;
|
||||
}
|
||||
|
|
12
index.html
12
index.html
|
@ -66,13 +66,14 @@
|
|||
<section class="left-small">
|
||||
<a class="left-off-canvas-toggle menu-icon" ><span></span></a>
|
||||
</section>
|
||||
<section class="right-small" ng-show="$root.iden && $root.iden.getWallets().length >1">
|
||||
<a class="right-off-canvas-toggle p10"><i class="icon-wallet size-24"></i></a>
|
||||
|
||||
<section class="right-small" ng-show="$root.iden && $root.wallet.isComplete()">
|
||||
<a class="p10" ng-click="$root.go('more')"><i class="fi-widget size-24"></i></a>
|
||||
</section>
|
||||
|
||||
<section class="middle tab-bar-section">
|
||||
<h1 class="title">
|
||||
<img src="img/logo-negative-beta.svg" alt="Copay" width="60">
|
||||
<h1 class="title ellipsis" ng-show="$root.iden && $root.wallet">
|
||||
{{$root.wallet.getName()}}
|
||||
</h1>
|
||||
</section>
|
||||
</nav>
|
||||
|
@ -81,9 +82,6 @@
|
|||
<div ng-include="'views/includes/sidebar-mobile.html'"></div>
|
||||
</nav>
|
||||
|
||||
<nav class="right-off-canvas-menu" ng-show="$root.iden && $root.iden.getWallets().length >1">
|
||||
<div ng-include="'views/includes/walletbar-mobile.html'"></div>
|
||||
</nav>
|
||||
<div
|
||||
ng-if="$root.iden"
|
||||
ng-include="'views/includes/sidebar.html'"
|
||||
|
|
|
@ -102,6 +102,10 @@ angular
|
|||
.when('/profile', {
|
||||
templateUrl: 'views/profile.html',
|
||||
logged: true
|
||||
})
|
||||
.when('/add', {
|
||||
templateUrl: 'views/add.html',
|
||||
logged: true
|
||||
});
|
||||
|
||||
if (config.developmentFeatures) {
|
||||
|
|
|
@ -20,27 +20,16 @@ angular.module('copayApp.services').factory('go', function($window, $rootScope,
|
|||
|
||||
var elem = angular.element(document.querySelector('#off-canvas-wrap'));
|
||||
var leftbarActive = angular.element(document.getElementsByClassName('move-right')).length;
|
||||
var rightbarActive = angular.element(document.getElementsByClassName('move-left')).length;
|
||||
|
||||
if (invert) {
|
||||
if (rightbarActive) {
|
||||
hideSidebars();
|
||||
}
|
||||
else {
|
||||
if ($rootScope.iden && !$rootScope.hideNavigation) {
|
||||
elem.addClass('move-right');
|
||||
}
|
||||
if ($rootScope.iden && !$rootScope.hideNavigation) {
|
||||
elem.addClass('move-right');
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (leftbarActive) {
|
||||
hideSidebars();
|
||||
}
|
||||
else {
|
||||
if ($rootScope.iden && $rootScope.iden.getWallets().length >1) {
|
||||
elem.addClass('move-left');
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
<div class="small-12 columns add-wallet">
|
||||
<a class="button-setup db oh" title="Create new wallet" ng-click="$root.go('create')">
|
||||
<i class="fi-plus"></i>
|
||||
<span>Create new wallet</span>
|
||||
</a>
|
||||
|
||||
<a class="button-setup db oh" title="Join shared wallet" ng-click="$root.go('join')">
|
||||
<i class="icon-people"></i>
|
||||
<span>Join shared wallet</span>
|
||||
</a>
|
||||
|
||||
<a class="button-setup db oh" title="Import wallet" ng-click="$root.go('import')">
|
||||
<i class="icon-upload"></i>
|
||||
<span>Import wallet</span>
|
||||
</a>
|
||||
</div>
|
|
@ -1,43 +1,56 @@
|
|||
<div>
|
||||
<ul class="off-canvas-list">
|
||||
<li>
|
||||
<a ng-click="$root.go('profile')" class="db p20h nav-item text-center" title="Create new wallet">
|
||||
<div class="photo-container m20t">
|
||||
<img gravatar-src="'{{$root.iden.getName()}}'" gravatar-size="35">
|
||||
</div>
|
||||
<p class="text-black m5">{{$root.iden.getName()}}</p>
|
||||
<span class="db text-gray size-10">
|
||||
<i class="fi-torso"></i> {{'View My Profile' | translate }}
|
||||
</span>
|
||||
|
||||
</a>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
<a ng-click="$root.go('create')" class="db p20h nav-item" title="Create new wallet">
|
||||
<i class="size-24 m20r fi-plus"></i> {{'Create new wallet' | translate }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a ng-click="$root.go('join')" class="db p20h nav-item" title="Join shared wallet">
|
||||
<i class="size-24 m20r fi-torsos-all"></i> {{'Join shared wallet' | translate }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a ng-click="$root.go('import')" class="db p20h nav-item" title="Import wallet">
|
||||
<i class="size-24 m20r fi-download"></i> {{'Import a wallet' | translate }}</a>
|
||||
</li>
|
||||
<li ng-if="$root.wallet">
|
||||
<a ng-click="$root.go('more')" class="db p20h nav-item" title="Settings">
|
||||
<i class="size-24 m20r fi-widget"></i> {{'Wallet Settings' | translate }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="db p20h nav-item" title="Close" ng-click="signout()">
|
||||
<span ng-if="!$root.hasPin"><i class="size-24 m20r fi-power"></i> {{'Close'|translate}}</span>
|
||||
<span ng-if="$root.hasPin"><i class="size-24 m20r fi-lock"></i> {{'Lock'|translate}}</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="text-gray size-12 text-center columns">
|
||||
<div ng-include="'views/includes/version.html'"></div>
|
||||
<header ng-click="$root.go('profile')">
|
||||
<div class="photo-container left">
|
||||
<img gravatar-src="'{{$root.iden.getName()}}'" gravatar-size="35">
|
||||
</div>
|
||||
<div class="left m5t">
|
||||
<div class="text-white">{{$root.iden.getName()}}</div>
|
||||
<div class="text-gray size-10"> {{'View My Profile' | translate }} </div>
|
||||
</div>
|
||||
<div class="right">
|
||||
<i class="icon-arrow-right3 size-16 db m15t text-white"></i>
|
||||
</div>
|
||||
</header>
|
||||
<div class="scroll-section">
|
||||
<ul class="sidebar-mobile-wallets oh off-canvas-list m10b" ng-show="wallets[0]">
|
||||
<li
|
||||
ng-repeat="item in wallets track by $index"
|
||||
ng-class="{'selected': item.id == $root.wallet.id}"
|
||||
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 class="size-12 wallet-item">
|
||||
<div class="oh">
|
||||
<div class="right size-10 text-gray">
|
||||
[ {{item.requiredCopayers}} of {{item.totalCopayers}} ]</div>
|
||||
<div class="ellipsis name-wallet text-black">{{item.name || item.id}}</div>
|
||||
</div>
|
||||
<div class="oh text-bold">
|
||||
<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 gray size-10">{{item.balanceInfo.totalBalanceAlternative}} {{item.balanceInfo.alternativeIsoCode}}</span>
|
||||
</div>
|
||||
<span ng-if="!item.isComplete()">Waiting for copayers...</span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<a class="button-addwallet" title="Add wallet" ng-click="$root.go('add')">
|
||||
<i class="fi-plus"></i> Add wallet
|
||||
</a>
|
||||
|
||||
<div class="text-gray size-12 text-center columns">
|
||||
<div ng-include="'views/includes/version.html'"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sidebar-bottom">
|
||||
<a class="db text-gray tu" title="Close" ng-click="signout()">
|
||||
<span ng-if="!$root.hasPin"><i class="size-16 m5r fi-power"></i> {{'Close'|translate}}</span>
|
||||
<span ng-if="$root.hasPin"><i class="size-16 m5r icon-locked"></i> {{'Lock'|translate}}</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
<div>
|
||||
<header ng-show="$root.wallet">
|
||||
<h1>My wallets</h1>
|
||||
</header>
|
||||
<ul class="side-nav wallets off-canvas-list" ng-show="wallets[0]">
|
||||
<li
|
||||
ng-repeat="item in wallets track by $index"
|
||||
ng-class="{'selected': item.id == $root.wallet.id}"
|
||||
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 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>
|
Loading…
Reference in New Issue