+
{{'TENANT-CONFIGURATION-EDITOR.FIELDS.PRIMARY-COLOR' | translate}}
@@ -56,6 +56,21 @@
{{'GENERAL.VALIDATION.REQUIRED' | translate}}
{{'GENERAL.VALIDATION.INVALID-COLOR' | translate}}
+
+
+ {{'TENANT-CONFIGURATION-EDITOR.FIELDS.WARNING-COLOR' | translate}}
+
+
+
+ {{formGroup.get('cssColors')?.get('invertedBtnColor')?.getError('backendError').message}}
+ {{'GENERAL.VALIDATION.REQUIRED' | translate}}
+ {{'GENERAL.VALIDATION.INVALID-COLOR' | translate}}
+
diff --git a/frontend/src/app/ui/admin/tenant-configuration/editor/css-colors/css-colors-editor.component.ts b/frontend/src/app/ui/admin/tenant-configuration/editor/css-colors/css-colors-editor.component.ts
index 2735adb31..8bb0e0ecc 100644
--- a/frontend/src/app/ui/admin/tenant-configuration/editor/css-colors/css-colors-editor.component.ts
+++ b/frontend/src/app/ui/admin/tenant-configuration/editor/css-colors/css-colors-editor.component.ts
@@ -19,7 +19,6 @@ import { BasePendingChangesComponent } from '@common/base/base-pending-changes.c
import { Observable } from 'rxjs';
import { TenantConfigurationType } from '@app/core/common/enum/tenant-configuration-type';
import { HttpErrorResponse } from '@angular/common/http';
-import { ResponseErrorCode } from '@app/core/common/enum/respone-error-code';
import { LoggingService } from '@app/core/services/logging/logging-service';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
@@ -154,6 +153,17 @@ export class CssColorsEditorComponent extends BasePendingChangesComponent implem
emitEvent: false,
});
});
+
+ this.formGroup.get('cssColors')?.get('warningColor').valueChanges.subscribe((color) => {
+ this.formGroup.get('cssColors')?.get('warningColorInput').setValue(color, {
+ emitEvent: false,
+ });
+ });
+ this.formGroup.get('cssColors')?.get('warningColorInput').valueChanges.subscribe((color) => {
+ this.formGroup.get('cssColors')?.get('warningColor').setValue(color, {
+ emitEvent: false,
+ });
+ });
}
getItem(successFunction: (item: TenantConfiguration) => void) {
@@ -214,6 +224,7 @@ export class CssColorsEditorComponent extends BasePendingChangesComponent implem
localStorage.setItem('primaryText', formData?.cssColors?.primaryText);
localStorage.setItem('secondaryText', formData?.cssColors?.secondaryText);
localStorage.setItem('invertedBtnColor', formData?.cssColors?.invertedBtnColor);
+ localStorage.setItem('warningColor', formData?.cssColors?.warningColor);
this.tenantConfigurationService.persist(formData)
.pipe(takeUntil(this._destroyed)).subscribe(
diff --git a/frontend/src/app/ui/admin/tenant-configuration/editor/css-colors/css-colors-editor.model.ts b/frontend/src/app/ui/admin/tenant-configuration/editor/css-colors/css-colors-editor.model.ts
index d48e5a60b..ccdefee1e 100644
--- a/frontend/src/app/ui/admin/tenant-configuration/editor/css-colors/css-colors-editor.model.ts
+++ b/frontend/src/app/ui/admin/tenant-configuration/editor/css-colors/css-colors-editor.model.ts
@@ -60,6 +60,7 @@ export class CssColorsTenantConfigurationEditorModel implements CssColorsTenantC
primaryText: string;
secondaryText: string;
invertedBtnColor: string;
+ warningColor: string;
protected formBuilder: UntypedFormBuilder = new UntypedFormBuilder();
@@ -76,6 +77,7 @@ export class CssColorsTenantConfigurationEditorModel implements CssColorsTenantC
this.primaryText = localStorage.getItem('primaryText') ?? '#ffffff';
this.secondaryText = localStorage.getItem('secondaryText') ?? '#000000';
this.invertedBtnColor = localStorage.getItem('invertedBtnColor') ?? '#ffffff';
+ this.warningColor = localStorage.getItem('warningColor') ?? '#ff4081';
}
return this;
}
@@ -108,6 +110,9 @@ export class CssColorsTenantConfigurationEditorModel implements CssColorsTenantC
secondaryTextInput: [{ value: this.secondaryText, disabled: disabled}, context.getValidation('secondaryTextInput').validators ],
primaryTextInput: [{ value: this.primaryText, disabled: disabled}, context.getValidation('primaryTextInput').validators ],
invertedBtnColorInput: [{ value: this.invertedBtnColor, disabled: disabled}, context.getValidation('invertedBtnColorInput').validators ],
+
+ warningColor: [{ value: this.warningColor, disabled: disabled }, context.getValidation('secondaryText').validators],
+ warningColorInput: [{ value: this.warningColor, disabled: disabled }, context.getValidation('invertedBtnColor').validators],
},
{ updateOn: "change" });
@@ -137,6 +142,8 @@ export class CssColorsTenantConfigurationEditorModel implements CssColorsTenantC
baseValidationArray.push({ key: 'primaryTextInput', validators: [validColorValidator()] });
baseValidationArray.push({ key: 'secondaryTextInput', validators: [validColorValidator()] });
baseValidationArray.push({ key: 'invertedBtnColorInput', validators: [validColorValidator()] });
+ baseValidationArray.push({ key: 'warningColor', validators: [validColorValidator()] });
+ baseValidationArray.push({ key: 'warningColorInput', validators: [validColorValidator()] });
baseContext.validation = baseValidationArray;
return baseContext;
diff --git a/frontend/src/assets/i18n/baq.json b/frontend/src/assets/i18n/baq.json
index 767664611..e182f44e7 100644
--- a/frontend/src/assets/i18n/baq.json
+++ b/frontend/src/assets/i18n/baq.json
@@ -479,6 +479,7 @@
"SECONDARY-COLOR-TEXT": "Secondary Color Text",
"INVERTED-BUTTON-COLOR": "Inverted Button Color",
"INVERTED-BUTTON-HINT": "Background color for buttons whose text color is the selected Primary color",
+ "WARNING-COLOR": "Warning Color",
"DISABLE-SYSTEM-SOURCES": "Disable System Sources",
"DEPOSIT-PLUGINS": "Plugin",
"FILE-TRANSFORMER-PLUGINS": "Plugin",
diff --git a/frontend/src/assets/i18n/de.json b/frontend/src/assets/i18n/de.json
index 96e269b58..878caff4d 100644
--- a/frontend/src/assets/i18n/de.json
+++ b/frontend/src/assets/i18n/de.json
@@ -482,6 +482,7 @@
"SECONDARY-COLOR-TEXT": "Secondary Color Text",
"INVERTED-BUTTON-COLOR": "Inverted Button Color",
"INVERTED-BUTTON-HINT": "Background color for buttons whose text color is the selected Primary color",
+ "WARNING-COLOR": "Warning Color",
"DISABLE-SYSTEM-SOURCES": "Disable System Sources",
"DEPOSIT-PLUGINS": "Plugin",
"FILE-TRANSFORMER-PLUGINS": "Plugin",
diff --git a/frontend/src/assets/i18n/en.json b/frontend/src/assets/i18n/en.json
index 84be4e221..a95828fee 100644
--- a/frontend/src/assets/i18n/en.json
+++ b/frontend/src/assets/i18n/en.json
@@ -488,6 +488,7 @@
"SECONDARY-COLOR-TEXT": "Secondary Color Text",
"INVERTED-BUTTON-COLOR": "Inverted Button Color",
"INVERTED-BUTTON-HINT": "Background color for buttons whose text color is the selected Primary color",
+ "WARNING-COLOR": "Warning Color",
"DISABLE-SYSTEM-SOURCES": "Disable System Sources",
"DEPOSIT-PLUGINS": "Plugin",
"FILE-TRANSFORMER-PLUGINS": "Plugin",
diff --git a/frontend/src/assets/i18n/es.json b/frontend/src/assets/i18n/es.json
index 1d1669e3d..f1cc312cd 100644
--- a/frontend/src/assets/i18n/es.json
+++ b/frontend/src/assets/i18n/es.json
@@ -482,6 +482,7 @@
"SECONDARY-COLOR-TEXT": "Secondary Color Text",
"INVERTED-BUTTON-COLOR": "Inverted Button Color",
"INVERTED-BUTTON-HINT": "Background color for buttons whose text color is the selected Primary color",
+ "WARNING-COLOR": "Warning Color",
"DISABLE-SYSTEM-SOURCES": "Disable System Sources",
"DEPOSIT-PLUGINS": "Plugin",
"FILE-TRANSFORMER-PLUGINS": "Plugin",
diff --git a/frontend/src/assets/i18n/gr.json b/frontend/src/assets/i18n/gr.json
index 68a7d6d90..76c729572 100644
--- a/frontend/src/assets/i18n/gr.json
+++ b/frontend/src/assets/i18n/gr.json
@@ -482,6 +482,7 @@
"SECONDARY-COLOR-TEXT": "Secondary Color Text",
"INVERTED-BUTTON-COLOR": "Inverted Button Color",
"INVERTED-BUTTON-HINT": "Background color for buttons whose text color is the selected Primary color",
+ "WARNING-COLOR": "Warning Color",
"DISABLE-SYSTEM-SOURCES": "Disable System Sources",
"DEPOSIT-PLUGINS": "Plugin",
"FILE-TRANSFORMER-PLUGINS": "Plugin",
diff --git a/frontend/src/assets/i18n/hr.json b/frontend/src/assets/i18n/hr.json
index 8a1d9f6ca..e72962dc6 100644
--- a/frontend/src/assets/i18n/hr.json
+++ b/frontend/src/assets/i18n/hr.json
@@ -481,6 +481,7 @@
"PRIMARY-COLOR-TEXT": "Primary Color Text",
"INVERTED-BUTTON-COLOR": "Inverted Button Color",
"INVERTED-BUTTON-HINT": "Background color for buttons whose text color is the selected Primary color",
+ "WARNING-COLOR": "Warning Color",
"DISABLE-SYSTEM-SOURCES": "Disable System Sources",
"DEPOSIT-PLUGINS": "Plugin",
"FILE-TRANSFORMER-PLUGINS": "Plugin",
diff --git a/frontend/src/assets/i18n/pl.json b/frontend/src/assets/i18n/pl.json
index 47a8d8259..a1cb241f1 100644
--- a/frontend/src/assets/i18n/pl.json
+++ b/frontend/src/assets/i18n/pl.json
@@ -482,6 +482,7 @@
"SECONDARY-COLOR-TEXT": "Secondary Color Text",
"INVERTED-BUTTON-COLOR": "Inverted Button Color",
"INVERTED-BUTTON-HINT": "Background color for buttons whose text color is the selected Primary color",
+ "WARNING-COLOR": "Warning Color",
"DISABLE-SYSTEM-SOURCES": "Disable System Sources",
"DEPOSIT-PLUGINS": "Plugin",
"FILE-TRANSFORMER-PLUGINS": "Plugin",
diff --git a/frontend/src/assets/i18n/pt.json b/frontend/src/assets/i18n/pt.json
index f553e2d4e..4be68a3c8 100644
--- a/frontend/src/assets/i18n/pt.json
+++ b/frontend/src/assets/i18n/pt.json
@@ -481,6 +481,7 @@
"SECONDARY-COLOR-TEXT": "Secondary Color Text",
"INVERTED-BUTTON-COLOR": "Inverted Button Color",
"INVERTED-BUTTON-HINT": "Background color for buttons whose text color is the selected Primary color",
+ "WARNING-COLOR": "Warning Color",
"DISABLE-SYSTEM-SOURCES": "Disable System Sources",
"DEPOSIT-PLUGINS": "Plugin",
"FILE-TRANSFORMER-PLUGINS": "Plugin",
diff --git a/frontend/src/assets/i18n/sk.json b/frontend/src/assets/i18n/sk.json
index e3fc7a3bb..90ef74694 100644
--- a/frontend/src/assets/i18n/sk.json
+++ b/frontend/src/assets/i18n/sk.json
@@ -482,6 +482,7 @@
"SECONDARY-COLOR-TEXT": "Secondary Color Text",
"INVERTED-BUTTON-COLOR": "Inverted Button Color",
"INVERTED-BUTTON-HINT": "Background color for buttons whose text color is the selected Primary color",
+ "WARNING-COLOR": "Warning Color",
"DISABLE-SYSTEM-SOURCES": "Disable System Sources",
"DEPOSIT-PLUGINS": "Plugin",
"FILE-TRANSFORMER-PLUGINS": "Plugin",
diff --git a/frontend/src/assets/i18n/sr.json b/frontend/src/assets/i18n/sr.json
index 440d5a186..94b2fcb6f 100644
--- a/frontend/src/assets/i18n/sr.json
+++ b/frontend/src/assets/i18n/sr.json
@@ -482,6 +482,7 @@
"SECONDARY-COLOR-TEXT": "Secondary Color Text",
"INVERTED-BUTTON-COLOR": "Inverted Button Color",
"INVERTED-BUTTON-HINT": "Background color for buttons whose text color is the selected Primary color",
+ "WARNING-COLOR": "Warning Color",
"DISABLE-SYSTEM-SOURCES": "Disable System Sources",
"DEPOSIT-PLUGINS": "Plugin",
"FILE-TRANSFORMER-PLUGINS": "Plugin",
diff --git a/frontend/src/assets/i18n/tr.json b/frontend/src/assets/i18n/tr.json
index 5c84e2482..f089e43d0 100644
--- a/frontend/src/assets/i18n/tr.json
+++ b/frontend/src/assets/i18n/tr.json
@@ -482,6 +482,7 @@
"SECONDARY-COLOR-TEXT": "Secondary Color Text",
"INVERTED-BUTTON-COLOR": "Inverted Button Color",
"INVERTED-BUTTON-HINT": "Background color for buttons whose text color is the selected Primary color",
+ "WARNING-COLOR": "Warning Color",
"DISABLE-SYSTEM-SOURCES": "Disable System Sources",
"DEPOSIT-PLUGINS": "Plugin",
"FILE-TRANSFORMER-PLUGINS": "Plugin",
diff --git a/frontend/src/styles.scss b/frontend/src/styles.scss
index d717a6e8a..c95fbdcd6 100644
--- a/frontend/src/styles.scss
+++ b/frontend/src/styles.scss
@@ -36,7 +36,7 @@
--secondary-text: #000000;
--inverted-btn-color: #ffffff;
- --warning-color: #f44336;
+ --warning-color: var(--mat-form-field-error-text-color); // #cf1407 for better contrast
--gray: #707070; //previously #848484
--light-gray: #aaaaaa;
--dark-gray: #212121;