[Library | Trunk]: Full screen modal: Remove footer, move buttons on header, Make heading h4. User component: Redirect on error code 3

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60660 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
k.triantafyllou 2021-03-17 15:42:43 +00:00
parent edbd5a8fa3
commit 1f55667499
2 changed files with 14 additions and 9 deletions

View File

@ -52,7 +52,7 @@ export class UserComponent {
this.errorCode = params["errorCode"];
this.redirectUrl = params["redirectUrl"];
this.errorMessage = "";
if (this.loggedIn && this.errorCode == '1') {
if (this.loggedIn && (this.errorCode == '1' || this.errorCode == '3')) {
this.redirect();
} else {
this.loading = false;

View File

@ -7,19 +7,24 @@ import {delay} from "rxjs/operators";
template: `
<div class="fs-modal" (click)="close()">
<div id="fs-modal" (click)="$event.stopPropagation()" class="fs-modal-dialog">
<a class="close" (click)="close()">
<!--<a class="close" (click)="close()">
<icon name="close"></icon>
</a>
</a>-->
<div class="header">
<h6 *ngIf="title">{{title}}</h6>
<div class="uk-flex-middle uk-grid" uk-grid>
<h4 *ngIf="title" class="uk-margin-remove uk-width-expand uk-text-truncate">{{title}}</h4>
<div *ngIf="cancelButton || okButton" class="uk-flex uk-flex-right">
<div>
<ng-content select="[actions]"></ng-content>
</div>
<button *ngIf="cancelButton" class="uk-button uk-button-secondary outlined uk-margin-small-left" [disabled]="cancelButtonDisabled" (click)="close()">{{cancelButtonText}}</button>
<button *ngIf="okButton" class="uk-button uk-button-secondary uk-margin-small-left" [disabled]="okButtonDisabled" (click)="ok()">{{okButtonText}}</button>
</div>
</div>
</div>
<div class="content" [class.hasFooter]="cancelButton || okButton">
<div class="content">
<ng-content></ng-content>
</div>
<div *ngIf="cancelButton || okButton" class="footer uk-flex uk-flex-right">
<button *ngIf="cancelButton" class="uk-button uk-button-secondary outlined" [disabled]="cancelButtonDisabled" (click)="close()">{{cancelButtonText}}</button>
<button *ngIf="okButton" class="uk-button uk-button-secondary uk-margin-small-left" [disabled]="okButtonDisabled" (click)="ok()">{{okButtonText}}</button>
</div>
</div>
</div>
`