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 31 additions and 25 deletions

View File

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

View File

@ -1,7 +1,7 @@
'use strict';
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;
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.isCordova = isCordova;
$scope.username = $rootScope.iden ? $rootScope.iden.getName() : '';
$scope.menu = [{
'title': 'Home',

View File

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

View File

@ -4,7 +4,11 @@
<div class="panel">
<div class="row collapse">
<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" src="img/change-avatar.png" with="80">
</a>