[Library]: If user signs in and portal is connect, then he will be redirected to myCommunities route.
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@56919 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
b8ffee979b
commit
952238a23a
|
@ -81,6 +81,7 @@ export class UserMiniComponent {
|
|||
@Input() logInUrl;
|
||||
@Input() logOutUrl;
|
||||
@Input() cookieDomain;
|
||||
@Input() communityId = null;
|
||||
public redirectUrl: string = "";
|
||||
sub:any;
|
||||
|
||||
|
@ -133,8 +134,13 @@ export class UserMiniComponent {
|
|||
}
|
||||
|
||||
logIn(){
|
||||
Session.setReloadUrl(location.protocol +"//"+location.host, location.pathname, location.search);
|
||||
window.location.href = this.logInUrl
|
||||
if(this.communityId && this.communityId === 'connect') {
|
||||
Session.setReloadUrl(location.protocol +"//"+location.host, '/myCommunities', null);
|
||||
}
|
||||
else {
|
||||
Session.setReloadUrl(location.protocol +"//"+location.host, location.pathname, location.search);
|
||||
}
|
||||
window.location.href = this.logInUrl;
|
||||
}
|
||||
|
||||
onClick(id: string) {
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
</ng-container>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="userMenu">
|
||||
<user-mini mobileView=true [userMenuItems]=userMenuItems [logInUrl]=properties.loginUrl [logOutUrl]=properties.logoutUrl [cookieDomain]=properties.cookieDomain></user-mini>
|
||||
<user-mini mobileView=true [communityId]="(communityId)?communityId:properties.adminToolsCommunity" [userMenuItems]=userMenuItems [logInUrl]=properties.loginUrl [logOutUrl]=properties.logoutUrl [cookieDomain]=properties.cookieDomain></user-mini>
|
||||
</ng-container>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -196,7 +196,7 @@
|
|||
<!-- </div> -->
|
||||
<!-- <div *ngIf="userMenu" class="uk-navbar-right"> -->
|
||||
<!-- <div *ngIf="userMenu" class="uk-navbar-right"> -->
|
||||
<user-mini *ngIf="userMenu" [userMenuItems]=userMenuItems [logInUrl]=properties.loginUrl [logOutUrl]=properties.logoutUrl [cookieDomain]=properties.cookieDomain></user-mini>
|
||||
<user-mini *ngIf="userMenu" [communityId]="(communityId)?communityId:properties.adminToolsCommunity" [userMenuItems]=userMenuItems [logInUrl]=properties.loginUrl [logOutUrl]=properties.logoutUrl [cookieDomain]=properties.cookieDomain></user-mini>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
|
Loading…
Reference in New Issue