From b0b277278e273318688e44252ef19bc9dac82159 Mon Sep 17 00:00:00 2001 From: argirok Date: Thu, 8 Jun 2023 13:24:46 +0300 Subject: [PATCH 1/2] fix issue with datasource criteria form #8790 --- .../content-providers/criteria/criteria.component.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/app/pages/content-providers/criteria/criteria.component.ts b/src/app/pages/content-providers/criteria/criteria.component.ts index 41a54ae..db9fcea 100644 --- a/src/app/pages/content-providers/criteria/criteria.component.ts +++ b/src/app/pages/content-providers/criteria/criteria.component.ts @@ -49,7 +49,6 @@ export class CriteriaComponent implements OnInit, OnChanges, AfterViewInit, OnDe } ngOnInit() { - this.reset(); this.loading = false; this.subscriptions.push(this.vocabulariesService.getVocabularyByType('fos', null, properties).subscribe((fos: any[]) => { this.fos = fos.map(element => element.id); @@ -60,6 +59,9 @@ export class CriteriaComponent implements OnInit, OnChanges, AfterViewInit, OnDe } ngOnChanges(changes: SimpleChanges) { + if(changes.selectionCriteria){ + this.reset(); + } this.calculateMaxHeight(); } @@ -86,10 +88,11 @@ export class CriteriaComponent implements OnInit, OnChanges, AfterViewInit, OnDe } reset() { + this.selectionCriteriaForm = this.fb.group({ + criteria: this.fb.array([]) + }); if (this.selectionCriteria?.criteria) { - this.selectionCriteriaForm = this.fb.group({ - criteria: this.fb.array([]) - }); + this.selectionCriteria.criteria.forEach(criterion => { let constraintArray: UntypedFormArray = this.fb.array([]); criterion.constraint.forEach(constraint => { From 1320fb7a75372e6e6632eeef890e153d96149241 Mon Sep 17 00:00:00 2001 From: argirok Date: Fri, 9 Jun 2023 13:58:35 +0300 Subject: [PATCH 2/2] Customization configuration: add fontsDarkMode attribute for hero section --- .../background-upload.component.ts | 3 +- .../pages/customization/color.component.ts | 2 +- .../customization.component.html | 32 ++++++++++++++++--- 3 files changed, 31 insertions(+), 6 deletions(-) diff --git a/src/app/pages/customization/background-upload.component.ts b/src/app/pages/customization/background-upload.component.ts index c5886a3..e7d3ef5 100644 --- a/src/app/pages/customization/background-upload.component.ts +++ b/src/app/pages/customization/background-upload.component.ts @@ -26,6 +26,7 @@ declare var UIkit; class="uk-float-right uk-border-rounded uk-margin-top uk-margin-right uk-background-muted uk-button uk-button-link"> +
Lorem ipsum dolor sit amet...
@@ -51,7 +52,7 @@ export class BackgroundUploadComponent implements OnInit { @Input() oldBackground; // @Input() light:boolean; @Input() communityId: string = ""; - + @Input() light:boolean; //fonts mode public file: File; // public photo: string | ArrayBuffer; private maxsize: number = 2000 * 1024; diff --git a/src/app/pages/customization/color.component.ts b/src/app/pages/customization/color.component.ts index f2fb9cd..094100e 100644 --- a/src/app/pages/customization/color.component.ts +++ b/src/app/pages/customization/color.component.ts @@ -17,7 +17,7 @@ import {CustomizationOptions} from '../../openaireLibrary/connect/community/Cust
-
Contrast ratio may be too low.
+
Contrast ratio may be too low.
`, styles:[ ` diff --git a/src/app/pages/customization/customization.component.html b/src/app/pages/customization/customization.component.html index f532290..62831e6 100644 --- a/src/app/pages/customization/customization.component.html +++ b/src/app/pages/customization/customization.component.html @@ -207,11 +207,35 @@ -
- Hero section image +
+ Hero section +
+
+ Fonts + + + +
+
+ Dark mode + + + + +
+