1 import { Component, OnDestroy, OnInit } from '@angular/core';
3 import { Subscription } from 'rxjs';
5 import { Icons } from '../../../shared/enum/icons.enum';
6 import { NotificationService } from '../../../shared/services/notification.service';
7 import { SummaryService } from '../../../shared/services/summary.service';
10 selector: 'cd-notifications',
11 templateUrl: './notifications.component.html',
12 styleUrls: ['./notifications.component.scss']
14 export class NotificationsComponent implements OnInit, OnDestroy {
16 hasRunningTasks = false;
17 private subs = new Subscription();
20 public notificationService: NotificationService,
21 private summaryService: SummaryService
26 this.summaryService.subscribe((summary) => {
27 this.hasRunningTasks = summary.executing_tasks.length > 0;
33 this.subs.unsubscribe();
37 this.notificationService.toggleSidebar();