Merge pull request #48 from cmgustavo/feature/01signout
Signout link is now in the navbar
This commit is contained in:
commit
743728e27d
2 changed files with 5 additions and 16 deletions
11
index.html
11
index.html
|
|
@ -35,6 +35,9 @@
|
||||||
<li data-ng-repeat="item in menu" ui-route="/{{item.link}}" class="large-2 text-center" data-ng-class="{active: isActive(item)}">
|
<li data-ng-repeat="item in menu" ui-route="/{{item.link}}" class="large-2 text-center" data-ng-class="{active: isActive(item)}">
|
||||||
<a href="{{item.link}}"> <i class="{{item.icon}}"></i> {{item.title}}</a>
|
<a href="{{item.link}}"> <i class="{{item.icon}}"></i> {{item.title}}</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li class="large-2 text-center">
|
||||||
|
<a href="#" ng-click="signout()"> <i class="fi-power"></i> Signout</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
@ -52,14 +55,6 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="large-12 columns" ng-view></div>
|
<div class="large-12 columns" ng-view></div>
|
||||||
</div>
|
</div>
|
||||||
<div ng-controller="HeaderController" ng-show="$root.wallet">
|
|
||||||
<hr>
|
|
||||||
<div class="row">
|
|
||||||
<div class="text-center large-12 columns">
|
|
||||||
<a href="#" ng-click="signout()" class="button tiny">Signout</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Templates -->
|
<!-- Templates -->
|
||||||
<script type="text/ng-template" id="signin.html">
|
<script type="text/ng-template" id="signin.html">
|
||||||
|
|
|
||||||
|
|
@ -22,18 +22,14 @@ angular.module('copay.header').controller('HeaderController',
|
||||||
'title': 'Backup',
|
'title': 'Backup',
|
||||||
'icon': 'fi-archive',
|
'icon': 'fi-archive',
|
||||||
'link': '#/backup'
|
'link': '#/backup'
|
||||||
}, {
|
}];
|
||||||
'title': 'signout',
|
|
||||||
'icon': 'fi-power',
|
|
||||||
'link': '#/signout'
|
|
||||||
}]
|
|
||||||
|
|
||||||
if (!$rootScope.peerId) {
|
if (!$rootScope.peerId) {
|
||||||
$location.path('signin');
|
$location.path('signin');
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.isActive = function(item) {
|
$scope.isActive = function(item) {
|
||||||
if (item.link.replace('#','') == $location.path()) {
|
if (item.link && item.link.replace('#','') == $location.path()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -44,8 +40,6 @@ angular.module('copay.header').controller('HeaderController',
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.signout = function() {
|
$scope.signout = function() {
|
||||||
console.log('[header.js.37:signout:]'); //TODO
|
|
||||||
|
|
||||||
Network.disconnect(function() {
|
Network.disconnect(function() {
|
||||||
console.log('[header.js.41] disconnect CB'); //TODO
|
console.log('[header.js.41] disconnect CB'); //TODO
|
||||||
$location.path('signin');
|
$location.path('signin');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue