From ac88f3c6707793aba2194edcf2f06edd18d29543 Mon Sep 17 00:00:00 2001 From: argirok Date: Wed, 6 Dec 2023 15:14:43 +0200 Subject: [PATCH] [develop | DONE | ADDED] add cookie banner --- src/app/app.component.ts | 16 ++++++++++++++++ src/app/app.module.ts | 4 +++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 097bde4..26c67e7 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -27,6 +27,17 @@ import {LayoutService} from "./openaireLibrary/dashboard/sharedComponents/sideba + + National Open Access Monitor - Ireland, uses cookies in order to function properly.
+ Cookies are small pieces of data that websites store in your browser to allow us to give you the best browsing + experience possible. + By using the National Open Access Monitor - Ireland portal you accept our use of cookies. +
` }) export class AppComponent extends StakeholderBaseComponent implements OnInit { @@ -45,6 +56,7 @@ export class AppComponent extends StakeholderBaseComponent implements OnInit { userMenuItems: MenuItem[] = []; irish: Irish = new Irish(); user: User; + isClient:boolean = false; constructor(protected _route: ActivatedRoute, protected _router: Router, @@ -72,6 +84,10 @@ export class AppComponent extends StakeholderBaseComponent implements OnInit { this.subscriptions.push(this.layoutService.rootClass.subscribe(rootClass => { this.rootClass = rootClass; })); + if (typeof document !== 'undefined') { + this.isClient = true; + } + } initialize() { diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 52bf353..970020f 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -13,6 +13,7 @@ import {DEFAULT_TIMEOUT, TimeoutInterceptor} from "./openaireLibrary/timeout-int import {SharedModule} from "./openaireLibrary/shared/shared.module"; import {BrowserAnimationsModule} from "@angular/platform-browser/animations"; import {ErrorModule} from "./openaireLibrary/error/error.module"; +import {CookieLawModule} from "./openaireLibrary/sharedComponents/cookie-law/cookie-law.module"; @NgModule({ declarations: [ @@ -27,7 +28,8 @@ import {ErrorModule} from "./openaireLibrary/error/error.module"; LoadingModule, NavigationBarModule, BottomModule, - AppRoutingModule + AppRoutingModule, + CookieLawModule ], providers: [ {provide: APP_ID, useValue: 'irish-monitor'},