From 4a1daff947e49aff27b75c4282bd00fb62762179 Mon Sep 17 00:00:00 2001 From: "Patrik J. Braun" Date: Tue, 4 Jul 2023 22:49:05 +0200 Subject: [PATCH] Improving settings for map themes #587 #667 --- src/common/config/public/ClientConfig.ts | 6 +- .../settings-entry.component.html | 102 ++++++++++++++++++ .../settings-entry.component.ts | 8 +- 3 files changed, 112 insertions(+), 4 deletions(-) diff --git a/src/common/config/public/ClientConfig.ts b/src/common/config/public/ClientConfig.ts index 21ae26a8..842a7446 100644 --- a/src/common/config/public/ClientConfig.ts +++ b/src/common/config/public/ClientConfig.ts @@ -403,7 +403,7 @@ export class MapPathGroupThemeConfig { @ConfigProperty({ arrayType: 'string', tags: { - name: $localize`Matcher`, + name: $localize`Matchers`, priority: ConfigPriority.advanced }, description: $localize`List of regex string to match the name of the path. Case insensitive.`, @@ -442,7 +442,7 @@ export class MapPathGroupConfig { @ConfigProperty({ arrayType: MapPathGroupThemeConfig, tags: { - name: $localize`Matchers`, + name: $localize`Path themes`, priority: ConfigPriority.advanced }, description: $localize`Matchers for a given map and path theme.`, @@ -516,7 +516,7 @@ export class ClientMapConfig { @ConfigProperty({ arrayType: MapPathGroupConfig, tags: { - name: $localize`Path and marker group`, + name: $localize`Path theme groups`, priority: ConfigPriority.advanced } as TAGS, description: $localize`Markers are grouped and themed by these settings`, diff --git a/src/frontend/app/ui/settings/template/settings-entry/settings-entry.component.html b/src/frontend/app/ui/settings/template/settings-entry/settings-entry.component.html index 93c7ec4c..7cd29c19 100644 --- a/src/frontend/app/ui/settings/template/settings-entry/settings-entry.component.html +++ b/src/frontend/app/ui/settings/template/settings-entry/settings-entry.component.html @@ -191,6 +191,108 @@ + +
+
+
+
+ +
+
+ +
+
+
+ +
+
+ + +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ + +
+
+
+
+ +
+
+ +
+ +
+
+ +
+ +
+
+
+
+
+ +
+
+
+
+
diff --git a/src/frontend/app/ui/settings/template/settings-entry/settings-entry.component.ts b/src/frontend/app/ui/settings/template/settings-entry/settings-entry.component.ts index 5c1ff523..4d980f75 100644 --- a/src/frontend/app/ui/settings/template/settings-entry/settings-entry.component.ts +++ b/src/frontend/app/ui/settings/template/settings-entry/settings-entry.component.ts @@ -3,7 +3,7 @@ import {ControlValueAccessor, NG_VALIDATORS, NG_VALUE_ACCESSOR, ValidationErrors import {Utils} from '../../../../../../common/Utils'; import {propertyTypes} from 'typeconfig/common'; import {SearchQueryParserService} from '../../../gallery/search/search-query-parser.service'; -import {MapLayers, NavigationLinkConfig, NavigationLinkTypes, TAGS, ThemeConfig} from '../../../../../../common/config/public/ClientConfig'; +import {MapLayers, MapPathGroupConfig, MapPathGroupThemeConfig, NavigationLinkConfig, NavigationLinkTypes, TAGS, ThemeConfig} from '../../../../../../common/config/public/ClientConfig'; import {SettingsService} from '../../settings.service'; import {WebConfig} from '../../../../../../common/config/private/WebConfig'; import {JobScheduleConfig, UserConfig} from '../../../../../../common/config/private/PrivateConfig'; @@ -206,6 +206,10 @@ export class SettingsEntryComponent this.arrayType = 'MapLayers'; } else if (this.state.arrayType === NavigationLinkConfig) { this.arrayType = 'NavigationLinkConfig'; + } else if (this.state.arrayType === MapPathGroupConfig) { + this.arrayType = 'MapPathGroupConfig'; + } else if (this.state.arrayType === MapPathGroupThemeConfig) { + this.arrayType = 'MapPathGroupThemeConfig'; } else if (this.state.arrayType === UserConfig) { this.arrayType = 'UserConfig'; } else if (this.state.arrayType === JobScheduleConfig) { @@ -220,6 +224,8 @@ export class SettingsEntryComponent this.type !== 'SearchQuery' && this.arrayType !== 'MapLayers' && this.arrayType !== 'NavigationLinkConfig' && + this.arrayType !== 'MapPathGroupConfig' && + this.arrayType !== 'MapPathGroupThemeConfig' && this.arrayType !== 'JobScheduleConfig' && this.arrayType !== 'UserConfig') { this.uiType = 'StringInput';