mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-04-25 05:19:43 +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;
|
interval = 10;
|
||||||
|
|
||||||
delayTime: number = 5000;
|
delayTime: number = 5000;
|
||||||
breakTime: number = 20;
|
breakTime: number = 20 * 60;
|
||||||
isEndless: boolean = false;
|
isEndless: boolean = true;
|
||||||
|
|
||||||
numberOfViews: number = 1;
|
numberOfViews: number = 1;
|
||||||
isLightThemeEnabled: boolean = false;
|
isLightThemeEnabled: boolean = false;
|
||||||
|
|
||||||
@ -41,7 +42,10 @@ export class NotificationBoxComponent implements OnInit, OnDestroy {
|
|||||||
let adbutler = localStorage.getItem('adbutler');
|
let adbutler = localStorage.getItem('adbutler');
|
||||||
var today = new Date().toISOString().substring(0, 10);
|
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;
|
this.themeService.getActualTheme() === 'light' ? this.isLightThemeEnabled = true : this.isLightThemeEnabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -82,7 +86,7 @@ export class NotificationBoxComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
showNotification() {
|
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.viewTimer = timer(0, 100);
|
||||||
this.progress = 0;
|
this.progress = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user