Skip to content
Snippets Groups Projects
Commit 158e944f authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

[enh] Add new button 'authenticate' in the top-right popover - fix #550

parent 96c059e6
No related branches found
No related tags found
No related merge requests found
......@@ -317,6 +317,14 @@ function AppController($scope, $rootScope, $state, $ionicSideMenuDelegate, $q, $
.catch(UIUtils.onError());
};
// Login and go to a state (or wallet if not)
$scope.doAuth = function() {
return $scope.loadWallet({auth: true})
.then(function() {
UIUtils.loading.hide();
});
};
// If connected and same pubkey
$scope.isUserPubkey = function(pubkey) {
return csWallet.isUserPubkey(pubkey);
......
<!-- profile -->
<button ng-if="enable"
<button ng-if="enable && auth"
class="button button-positive button-small ink"
ng-click="showEditUserProfile()">
{{'PROFILE.BTN_EDIT' | translate}}
......
......@@ -22,6 +22,13 @@
<div class="row" ng-show="login">
<div class="col col-66 col-offset-33">
<!-- auth -->
<button ng-show="!auth"
class="button button-assertive button-small ink"
ng-click="doAuth()">
{{'AUTH.BTN_AUTH' | translate}}
</button>
<!-- Allow extension here -->
<cs-extension-point name="profile-popover-user"></cs-extension-point>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment