RED-2524: Active downloads indicator

This commit is contained in:
Adina Țeudan 2021-10-20 18:12:34 +03:00
parent cddb921904
commit 6a4befad09
5 changed files with 7 additions and 10 deletions

View File

@ -70,6 +70,7 @@
<ng-container *ngFor="let item of userMenuItems; trackBy: trackByName">
<button (click)="(item.action)" *ngIf="item.show" [routerLink]="item.routerLink" mat-menu-item translate>
{{ item.name }}
<span *ngIf="item.showDot()" class="dot"></span>
</button>
</ng-container>

View File

@ -16,6 +16,7 @@ interface MenuItem {
readonly routerLink?: string;
readonly show: boolean;
readonly action?: () => void;
readonly showDot?: () => boolean;
}
const isNavigationStart = event => event instanceof NavigationStart;
@ -33,22 +34,26 @@ export class BaseScreenComponent {
name: _('top-bar.navigation-items.my-account.children.my-profile'),
routerLink: '/main/my-profile',
show: true,
showDot: () => false,
},
{
name: _('top-bar.navigation-items.my-account.children.admin'),
routerLink: '/main/admin',
show: this.currentUser.isManager || this.currentUser.isUserAdmin,
action: this.appStateService.reset,
showDot: () => false,
},
{
name: _('top-bar.navigation-items.my-account.children.downloads'),
routerLink: '/main/downloads',
show: this.currentUser.isUser,
showDot: () => this.fileDownloadService.hasPendingDownloads,
},
{
name: _('top-bar.navigation-items.my-account.children.trash'),
routerLink: '/main/admin/trash',
show: this.currentUser.isManager,
showDot: () => false,
},
];
readonly searchActions: readonly SpotlightSearchAction[] = [

View File

@ -42,11 +42,7 @@
}
.dot {
height: 8px;
width: 8px;
border-radius: 50%;
background-color: variables.$grey-4;
position: absolute;
top: 8px;
right: 8px;
}

View File

@ -43,11 +43,6 @@
}
.dot {
background: variables.$primary;
height: 8px;
width: 8px;
border-radius: 50%;
position: absolute;
top: 9px;
right: 10px;
}

@ -1 +1 @@
Subproject commit 782284f9e97ce63c0ecbc5be4b99bd8e41d89ad2
Subproject commit d2f16b1a8441e8d214a854582f9c8a10fda2fff0