[Library | Trunk]: 1. Change UIkit notifications on role-users. 2. Add header position on sidebar component. 3. Change line-height of icon base on ratio

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60003 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
k.triantafyllou 2020-12-01 15:43:12 +00:00
parent 074cb003e0
commit 3cb790b7a5
3 changed files with 22 additions and 22 deletions

View File

@ -7,7 +7,7 @@
[alt]="properties.environment"> [alt]="properties.environment">
<img *ngIf="headerLogoUrl" class="logo " [src]="headerLogoUrl"> <img *ngIf="headerLogoUrl" class="logo " [src]="headerLogoUrl">
<div *ngIf="!headerLogoUrl" class="portalLogo logo"></div> <div *ngIf="!headerLogoUrl" class="portalLogo logo"></div>
<div *ngIf="headerName" class="uk-disabled uk-text-muted" [class.uk-text-center]="!open" [ngClass]="open?('uk-text-' + headerPosition):''">{{headerName}}</div> <div *ngIf="headerName" class="uk-disabled uk-text-muted uk-margin-small-left uk-margin-small-right" [class.uk-text-center]="!open" [ngClass]="open?('uk-text-' + headerPosition):''">{{headerName}}</div>
</a> </a>
<div *ngIf="items.length > 0" class="menu_section uk-margin-xlarge-top"> <div *ngIf="items.length > 0" class="menu_section uk-margin-xlarge-top">
<ul class="uk-list"> <ul class="uk-list">

View File

@ -148,17 +148,17 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
this.userRegistryService.remove(this.type, this.id, this.selectedUser, this.role).subscribe(() => { this.userRegistryService.remove(this.type, this.id, this.selectedUser, this.role).subscribe(() => {
this.active = this.active.filter(user => user.email != this.selectedUser); this.active = this.active.filter(user => user.email != this.selectedUser);
this.userManagementService.updateUserInfo(); this.userManagementService.updateUserInfo();
UIkit.notification(this.selectedUser + ' is no longer ' + this.role + ' of ' + this.name + ' Dashboard', { UIkit.notification(this.selectedUser + ' <b>is no longer</b> ' + this.role + ' of ' + this.name + ' Dashboard', {
status: 'success', status: 'success',
timeout: 3000, timeout: 6000,
pos: 'top-left' pos: 'bottom-right'
}); });
this.loadActive = false; this.loadActive = false;
}, error => { }, error => {
UIkit.notification('An error has occurred. Please try again later', { UIkit.notification('An error has occurred. Please try again later', {
status: 'danger', status: 'danger',
timeout: 3000, timeout: 6000,
pos: 'top-left' pos: 'bottom-right'
}); });
this.loadActive = false; this.loadActive = false;
}); });
@ -168,17 +168,17 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
this.loadPending = true; this.loadPending = true;
this.userRegistryService.cancelInvitation(this.type, this.id, this.selectedUser, this.role).subscribe(() => { this.userRegistryService.cancelInvitation(this.type, this.id, this.selectedUser, this.role).subscribe(() => {
this.pending = this.pending.filter(user => user != this.selectedUser); this.pending = this.pending.filter(user => user != this.selectedUser);
UIkit.notification(StringUtils.capitalize(this.role) + ' invitation to ' + this.selectedUser + ' has been canceled', { UIkit.notification(StringUtils.capitalize(this.role) + ' invitation to ' + this.selectedUser + ' has been <b>canceled</b>', {
status: 'success', status: 'success',
timeout: 3000, timeout: 6000,
pos: 'top-left' pos: 'bottom-right'
}); });
this.loadPending = false; this.loadPending = false;
}, error => { }, error => {
UIkit.notification('An error has occurred. Please try again later', { UIkit.notification('An error has occurred. Please try again later', {
status: 'danger', status: 'danger',
timeout: 3000, timeout: 6000,
pos: 'top-left' pos: 'bottom-right'
}); });
this.loadPending = false; this.loadPending = false;
}); });
@ -195,17 +195,17 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
if (!this.pending.includes(this.invited.value)) { if (!this.pending.includes(this.invited.value)) {
this.pending.push(this.invited.value); this.pending.push(this.invited.value);
} }
UIkit.notification(StringUtils.capitalize(this.role) + ' invitation to ' + this.selectedUser + ' has been sent', { UIkit.notification(StringUtils.capitalize(this.role) + ' invitation to ' + this.selectedUser + ' has been <b>sent</b>', {
status: 'success', status: 'success',
timeout: 3000, timeout: 6000,
pos: 'top-left' pos: 'bottom-right'
}); });
this.loadPending = false; this.loadPending = false;
}, error => { }, error => {
UIkit.notification('An error has occurred. Please try again later', { UIkit.notification('An error has occurred. Please try again later', {
status: 'danger', status: 'danger',
timeout: 3000, timeout: 6000,
pos: 'top-left' pos: 'bottom-right'
}); });
this.loadActive = false; this.loadActive = false;
}) })
@ -216,17 +216,17 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
this.loadPending = true; this.loadPending = true;
this.roleFb.get('name').enable(); this.roleFb.get('name').enable();
this.userRegistryService.createRole(this.type, this.id, this.roleFb.value).subscribe(() => { this.userRegistryService.createRole(this.type, this.id, this.roleFb.value).subscribe(() => {
UIkit.notification('Group has been created', { UIkit.notification('Group has been <b> successfully created</b>', {
status: 'success', status: 'success',
timeout: 3000, timeout: 6000,
pos: 'top-left' pos: 'bottom-right'
}); });
this.updateLists(); this.updateLists();
}, error => { }, error => {
UIkit.notification('An error has occurred. Please try again later', { UIkit.notification('An error has occurred. Please try again later', {
status: 'danger', status: 'danger',
timeout: 3000, timeout: 6000,
pos: 'top-left' pos: 'bottom-right'
}); });
this.loadActive = false; this.loadActive = false;
this.loadPending = false; this.loadPending = false;

View File

@ -63,6 +63,6 @@ export class IconsComponent implements OnInit{
fill: this.fill, fill: this.fill,
stroke: this.stroke stroke: this.stroke
}; };
this.elementRef.nativeElement.style = 'line-height: 20px;'; this.elementRef.nativeElement.style = 'line-height: ' + this.ratio*20 + 'px;';
} }
} }