More optimizations by reducing requests

pull/2092/head
Anojh 6 years ago
parent 3a99f75daa
commit 1a352b2da0

@ -59,12 +59,12 @@ export class LandingPageComponent implements OnDestroy, OnInit {
this.images.getRandomBackground().subscribe(x => { this.images.getRandomBackground().subscribe(x => {
this.background = ""; this.background = "";
}); });
}, 1000); }, 10000);
setTimeout(() => { setTimeout(() => {
this.images.getRandomBackground().subscribe(x => { this.images.getRandomBackground().subscribe(x => {
this.background = this.sanitizer this.background = this.sanitizer
.bypassSecurityTrustStyle("linear-gradient(-10deg, transparent 20%, rgba(0,0,0,0.7) 20.0%, rgba(0,0,0,0.7) 80.0%, transparent 80%), url(" + x.url + ")"); .bypassSecurityTrustStyle("linear-gradient(-10deg, transparent 20%, rgba(0,0,0,0.7) 20.0%, rgba(0,0,0,0.7) 80.0%, transparent 80%), url(" + x.url + ")");
}); });
}, 1000); }, 10000);
} }
} }

@ -120,13 +120,13 @@ export class LoginComponent implements OnDestroy, OnInit {
this.images.getRandomBackground().subscribe(x => { this.images.getRandomBackground().subscribe(x => {
this.background = ""; this.background = "";
}); });
}, 1000); }, 10000);
setTimeout(() => { setTimeout(() => {
this.images.getRandomBackground().subscribe(x => { this.images.getRandomBackground().subscribe(x => {
this.background = this.sanitizer this.background = this.sanitizer
.bypassSecurityTrustStyle("linear-gradient(-10deg, transparent 20%, rgba(0,0,0,0.7) 20.0%, rgba(0,0,0,0.7) 80.0%, transparent 80%), url(" + x.url + ")"); .bypassSecurityTrustStyle("linear-gradient(-10deg, transparent 20%, rgba(0,0,0,0.7) 20.0%, rgba(0,0,0,0.7) 80.0%, transparent 80%), url(" + x.url + ")");
}); });
}, 1000); }, 10000);
} }
} }

Loading…
Cancel
Save