Fixed issues with cookie banner button and link
This commit is contained in:
parent
e025a64775
commit
9c0827749c
@ -0,0 +1,3 @@
|
|||||||
|
.center {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
@ -2,8 +2,8 @@
|
|||||||
<router-outlet></router-outlet>
|
<router-outlet></router-outlet>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="footer">
|
<div class="footer center">
|
||||||
<button class="center" *ngIf="hideCookieBanner" (click)="showBanner()">Cookie Einstellungen</button>
|
<button mat-raised-button color="accent" *ngIf="hideCookieBanner" (click)="showBanner()">Cookie Einstellungen</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<waecm-g4-y21-cookiebanner *ngIf="!hideCookieBanner" (on-accept)="cookieCallback($event)"
|
<waecm-g4-y21-cookiebanner *ngIf="!hideCookieBanner" (on-accept)="cookieCallback($event)"
|
||||||
|
|||||||
@ -14,7 +14,8 @@ export class LandingComponent {
|
|||||||
statistik = false;
|
statistik = false;
|
||||||
marketing = false;
|
marketing = false;
|
||||||
appname = environment.title;
|
appname = environment.title;
|
||||||
datenschutzlink = window.location + 'assets/datenschutz.html';
|
datenschutzlink = environment.protocol + '://' + environment.base_url + ':'
|
||||||
|
+ environment.port_fe + '/assets/datenschutz.html';
|
||||||
|
|
||||||
constructor(private cookieService: CookieService, private snackbarService: SnackbarService) {
|
constructor(private cookieService: CookieService, private snackbarService: SnackbarService) {
|
||||||
const hasAccepted = cookieService.hasAccepted();
|
const hasAccepted = cookieService.hasAccepted();
|
||||||
|
|||||||
@ -12,21 +12,21 @@ export class CookieService {
|
|||||||
constructor() { }
|
constructor() { }
|
||||||
|
|
||||||
hasAccepted(): boolean {
|
hasAccepted(): boolean {
|
||||||
return (sessionStorage.getItem(this.keyPflicht) === String(true));
|
return (localStorage.getItem(this.keyPflicht) === String(true));
|
||||||
}
|
}
|
||||||
|
|
||||||
hasStatistik(): boolean {
|
hasStatistik(): boolean {
|
||||||
return (sessionStorage.getItem(this.keyStatistik) === String(true));
|
return (localStorage.getItem(this.keyStatistik) === String(true));
|
||||||
}
|
}
|
||||||
|
|
||||||
hasMarketing(): boolean {
|
hasMarketing(): boolean {
|
||||||
return (sessionStorage.getItem(this.keyMarketing) === String(true));
|
return (localStorage.getItem(this.keyMarketing) === String(true));
|
||||||
}
|
}
|
||||||
|
|
||||||
accept(statistik: boolean, marketing: boolean): void {
|
accept(statistik: boolean, marketing: boolean): void {
|
||||||
sessionStorage.setItem(this.keyPflicht, String(true));
|
localStorage.setItem(this.keyPflicht, String(true));
|
||||||
sessionStorage.setItem(this.keyStatistik, String(statistik));
|
localStorage.setItem(this.keyStatistik, String(statistik));
|
||||||
sessionStorage.setItem(this.keyMarketing, String(marketing));
|
localStorage.setItem(this.keyMarketing, String(marketing));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,6 +7,8 @@ export const environment = {
|
|||||||
location: window.location.hostname,
|
location: window.location.hostname,
|
||||||
port_be: 8000,
|
port_be: 8000,
|
||||||
port_fe: 4200,
|
port_fe: 4200,
|
||||||
|
protocol: 'http',
|
||||||
|
base_url: 'localhost',
|
||||||
log_level: NgxLoggerLevel.WARN,
|
log_level: NgxLoggerLevel.WARN,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user