Merge pull request #2398 from cmgustavo/bug/sidebar-mobile-20

ACK
This commit is contained in:
Matias Pando 2015-02-04 16:22:18 -03:00
commit eeec4478f2
5 changed files with 33 additions and 27 deletions

View file

@ -82,37 +82,38 @@
<span translate> <strong class="size-16">Network Error</strong>.<br> Attempting to reconnect..</span> <span translate> <strong class="size-16">Network Error</strong>.<br> Attempting to reconnect..</span>
</div> </div>
<div ng-controller="SidebarController" ng-show="$root.iden && !$root.hideNavigation && !$root.wpInputFocused"> <div ng-if="$root.iden">
<nav class="tab-bar"> <div ng-controller="SidebarController" ng-show="!$root.hideNavigation && !$root.wpInputFocused">
<section class="left-small"> <nav class="tab-bar">
<a class="p10" <section class="left-small">
ng-click="openMenu()"><i class="fi-list size-24"></i></a> <a class="p10"
</section> ng-click="openMenu()"><i class="fi-list size-24"></i></a>
</section>
<section class="right-small" <section class="right-small"
ng-show="$root.iden && $root.wallet.isComplete() && !$root.hideWalletNavigation && isCordova"> ng-show="$root.wallet.isComplete() && !$root.hideWalletNavigation && isCordova">
<a class="p10" <a class="p10"
ng-click="openScanner()"><i class="fi-camera size-24"></i></a> ng-click="openScanner()"><i class="fi-camera size-24"></i></a>
</section> </section>
<section class="middle tab-bar-section"> <section class="middle tab-bar-section">
<h1 class="title ellipsis" ng-show="$root.iden && $root.wallet && !$root.hideWalletNavigation"> <h1 class="title ellipsis" ng-show="$root.wallet && !$root.hideWalletNavigation">
{{$root.wallet.getName()}} {{$root.wallet.getName()}}
</h1> </h1>
</section> </section>
</nav> </nav>
<nav class="left-off-canvas-menu" ng-show="$root.iden"> <nav class="left-off-canvas-menu">
<div ng-include="'views/includes/sidebar-mobile.html'"></div> <div ng-include="'views/includes/sidebar-mobile.html'"></div>
</nav> </nav>
<div ng-if="$root.iden" <div ng-include="'views/includes/sidebar.html'"
ng-include="'views/includes/sidebar.html'" role='navigation'
role='navigation' class="sidebar"></div>
class="sidebar"></div> <div class="bottom-bar" ng-if="$root.wallet &&
<div class="bottom-bar" ng-if="$root.wallet && $root.wallet.isComplete() && !$root.wallet.isLocked && !$root.hideWalletNavigation">
$root.wallet.isComplete() && !$root.wallet.isLocked && !$root.hideWalletNavigation"> <div ng-include="'views/includes/bottombar-mobile.html'"></div>
<div ng-include="'views/includes/bottombar-mobile.html'"></div> </div>
</div> </div>
</div> </div>

View file

@ -1,7 +1,7 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('HeadController', function($scope, $rootScope, $filter, $timeout, notification, identityService, balanceService) { angular.module('copayApp.controllers').controller('HeadController', function($scope, $rootScope, $filter, $timeout, notification, identityService, balanceService) {
$scope.username = $rootScope.iden.getName(); $scope.username = $rootScope.iden ? $rootScope.iden.getName() : '';
$scope.hoverMenu = false; $scope.hoverMenu = false;
var isChromeApp = typeof window !== "undefined" && window.chrome && chrome.runtime && chrome.runtime.id; var isChromeApp = typeof window !== "undefined" && window.chrome && chrome.runtime && chrome.runtime.id;

View file

@ -4,6 +4,7 @@ angular.module('copayApp.controllers').controller('SidebarController', function(
$scope.isMobile = isMobile.any(); $scope.isMobile = isMobile.any();
$scope.isCordova = isCordova; $scope.isCordova = isCordova;
$scope.username = $rootScope.iden ? $rootScope.iden.getName() : '';
$scope.menu = [{ $scope.menu = [{
'title': 'Home', 'title': 'Home',

View file

@ -1,7 +1,7 @@
<div ng-init="init()"> <div ng-init="init()">
<header ng-click="$root.go('profile')" class="text-center"> <header ng-click="$root.go('profile')" class="text-center">
<div class="photo-container"> <div class="photo-container">
<img gravatar-src="'{{$root.iden.getName()}}'" gravatar-size="45"> <img gravatar-src="'{{username}}'" gravatar-size="45">
</div> </div>
<div class="m5t"> <div class="m5t">
<div class="text-white text-bold ellipsis size-14">{{$root.iden.getName()}}</div> <div class="text-white text-bold ellipsis size-14">{{$root.iden.getName()}}</div>

View file

@ -4,7 +4,11 @@
<div class="panel"> <div class="panel">
<div class="row collapse"> <div class="row collapse">
<div class="large-2 medium-2 columns text-center"> <div class="large-2 medium-2 columns text-center">
<a class="photo-container profile" href="https://en.gravatar.com/" ng-init="isHover=0" ng-mouseenter="isHover=1" ng-mouseleave="isHover=0" target="_blank"> <a class="photo-container profile"
ng-click="$root.openExternalLink('https://gravatar.com/')"
ng-init="isHover=0"
ng-mouseenter="isHover=1"
ng-mouseleave="isHover=0">
<img ng-show="!isHover" gravatar-src="'{{username}}'" gravatar-size="80"> <img ng-show="!isHover" gravatar-src="'{{username}}'" gravatar-size="80">
<img ng-show="isHover" src="img/change-avatar.png" with="80"> <img ng-show="isHover" src="img/change-avatar.png" with="80">
</a> </a>