mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2024-12-20 13:33:06 +00:00
Update notification-box.component.ts
This commit is contained in:
parent
75de6d2c38
commit
69177e86fc
@ -25,8 +25,9 @@ export class NotificationBoxComponent implements OnInit, OnDestroy {
|
||||
interval = 10;
|
||||
|
||||
delayTime: number = 5000;
|
||||
breakTime: number = 20;
|
||||
isEndless: boolean = false;
|
||||
breakTime: number = 20 * 60;
|
||||
isEndless: boolean = true;
|
||||
|
||||
numberOfViews: number = 1;
|
||||
isLightThemeEnabled: boolean = false;
|
||||
|
||||
@ -41,7 +42,10 @@ export class NotificationBoxComponent implements OnInit, OnDestroy {
|
||||
let adbutler = localStorage.getItem('adbutler');
|
||||
var today = new Date().toISOString().substring(0, 10);
|
||||
|
||||
if (!this.location.path().includes('nodes') && !(adbutler == today)) this.startTimer();
|
||||
// to show ad once a day
|
||||
// if (!this.location.path().includes('nodes') && !(adbutler == today)) this.startTimer();
|
||||
|
||||
if (!this.location.path().includes('nodes')) this.startTimer();
|
||||
this.themeService.getActualTheme() === 'light' ? this.isLightThemeEnabled = true : this.isLightThemeEnabled = false;
|
||||
}
|
||||
|
||||
@ -82,7 +86,7 @@ export class NotificationBoxComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
showNotification() {
|
||||
localStorage.setItem('adbutler', new Date().toISOString().substring(0, 10));
|
||||
// localStorage.setItem('adbutler', new Date().toISOString().substring(0, 10));
|
||||
|
||||
this.viewTimer = timer(0, 100);
|
||||
this.progress = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user