Commit 4545b4d3 by Torkel Ödegaard

fix(login): minor fix redirect on login change

parent d74eb8c1
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
</li> </li>
<li ng-show="::!ctrl.isSignedIn"> <li ng-show="::!ctrl.isSignedIn">
<a href="{{ctrl.loginUrl}}" class="sidemenu-item"> <a href="{{ctrl.loginUrl}}" class="sidemenu-item" target="_self">
<span class="icon-circle sidemenu-icon"><i class="fa fa-fw fa-sign-in"></i></span> <span class="icon-circle sidemenu-icon"><i class="fa fa-fw fa-sign-in"></i></span>
<span class="sidemenu-item-text">Sign in</span> <span class="sidemenu-item-text">Sign in</span>
</a> </a>
......
...@@ -23,13 +23,13 @@ export class SideMenuCtrl { ...@@ -23,13 +23,13 @@ export class SideMenuCtrl {
this.mainLinks = config.bootData.mainNavLinks; this.mainLinks = config.bootData.mainNavLinks;
this.openUserDropdown(); this.openUserDropdown();
this.loginUrl = '/login?redirect=' + encodeURIComponent(this.$location.path()); this.loginUrl = 'login?redirect=' + encodeURIComponent(this.$location.path());
this.$scope.$on('$routeChangeSuccess', () => { this.$scope.$on('$routeChangeSuccess', () => {
if (!this.contextSrv.pinned) { if (!this.contextSrv.pinned) {
this.contextSrv.sidemenu = false; this.contextSrv.sidemenu = false;
} }
this.loginUrl = '/login?redirect=' + encodeURIComponent(this.$location.path()); this.loginUrl = 'login?redirect=' + encodeURIComponent(this.$location.path());
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment