mirror of
https://github.com/bpatrik/pigallery2.git
synced 2025-01-10 04:07:35 +02:00
parent
b1a19df2c3
commit
4a1daff947
@ -403,7 +403,7 @@ export class MapPathGroupThemeConfig {
|
|||||||
@ConfigProperty({
|
@ConfigProperty({
|
||||||
arrayType: 'string',
|
arrayType: 'string',
|
||||||
tags: {
|
tags: {
|
||||||
name: $localize`Matcher`,
|
name: $localize`Matchers`,
|
||||||
priority: ConfigPriority.advanced
|
priority: ConfigPriority.advanced
|
||||||
},
|
},
|
||||||
description: $localize`List of regex string to match the name of the path. Case insensitive.`,
|
description: $localize`List of regex string to match the name of the path. Case insensitive.`,
|
||||||
@ -442,7 +442,7 @@ export class MapPathGroupConfig {
|
|||||||
@ConfigProperty({
|
@ConfigProperty({
|
||||||
arrayType: MapPathGroupThemeConfig,
|
arrayType: MapPathGroupThemeConfig,
|
||||||
tags: {
|
tags: {
|
||||||
name: $localize`Matchers`,
|
name: $localize`Path themes`,
|
||||||
priority: ConfigPriority.advanced
|
priority: ConfigPriority.advanced
|
||||||
},
|
},
|
||||||
description: $localize`Matchers for a given map and path theme.`,
|
description: $localize`Matchers for a given map and path theme.`,
|
||||||
@ -516,7 +516,7 @@ export class ClientMapConfig {
|
|||||||
@ConfigProperty({
|
@ConfigProperty({
|
||||||
arrayType: MapPathGroupConfig,
|
arrayType: MapPathGroupConfig,
|
||||||
tags: {
|
tags: {
|
||||||
name: $localize`Path and marker group`,
|
name: $localize`Path theme groups`,
|
||||||
priority: ConfigPriority.advanced
|
priority: ConfigPriority.advanced
|
||||||
} as TAGS,
|
} as TAGS,
|
||||||
description: $localize`Markers are grouped and themed by these settings`,
|
description: $localize`Markers are grouped and themed by these settings`,
|
||||||
|
@ -191,6 +191,108 @@
|
|||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
|
<ng-container *ngSwitchCase="'MapPathGroupThemeConfig'">
|
||||||
|
<div class="container">
|
||||||
|
<div class="row mt-1 mb-1 bg-body-tertiary" *ngFor="let val of state.value; let i = index">
|
||||||
|
<div class="row mt-1 mb-1 bg-body-tertiary">
|
||||||
|
<div class="col ps-0">
|
||||||
|
<app-settings-entry
|
||||||
|
[ngModel]="val.__state.matchers"
|
||||||
|
[name]="'val_m_'+idName+i"
|
||||||
|
[id]="'val_m_'+idName+i"
|
||||||
|
(change)="onChange($event)"></app-settings-entry>
|
||||||
|
</div>
|
||||||
|
<div class="col-1 pe-0">
|
||||||
|
<button [disabled]="state.value.length == 1" (click)="remove(i)"
|
||||||
|
[ngClass]="state.value.length > 1? 'btn-danger':'btn-secondary'"
|
||||||
|
class="btn float-end">
|
||||||
|
<span class="oi oi-trash" aria-hidden="true" aria-label="Delete"></span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mt-1 mb-1 bg-body-tertiary">
|
||||||
|
<app-settings-entry
|
||||||
|
[ngModel]="val.theme.__state.color"
|
||||||
|
[name]="'color_m_'+idName+i"
|
||||||
|
[id]="'color_m_'+idName+i"
|
||||||
|
(change)="onChange($event)"></app-settings-entry>
|
||||||
|
</div>
|
||||||
|
<div class="row mt-1 mb-1 bg-body-tertiary">
|
||||||
|
|
||||||
|
<app-settings-entry
|
||||||
|
[ngModel]="val.theme.__state.dashArray"
|
||||||
|
[name]="'dashArray_n_'+idName+i"
|
||||||
|
[id]="'dashArray_n_'+idName+i"
|
||||||
|
(change)="onChange($event)"></app-settings-entry>
|
||||||
|
</div>
|
||||||
|
<div class="row mt-1 mb-1 bg-body-tertiary">
|
||||||
|
<app-settings-entry
|
||||||
|
[ngModel]="val.theme.svgIcon.__state.viewBoxWidth"
|
||||||
|
[name]="'viewBoxWidth_n_'+idName+i"
|
||||||
|
[id]="'viewBoxWidth_n_'+idName+i"
|
||||||
|
(change)="onChange($event)"></app-settings-entry>
|
||||||
|
</div>
|
||||||
|
<div class="row mt-1 mb-1 bg-body-tertiary">
|
||||||
|
<app-settings-entry
|
||||||
|
[ngModel]="val.theme.svgIcon.__state.path"
|
||||||
|
[name]="'path_n_'+idName+i"
|
||||||
|
[id]="'path_n_'+idName+i"
|
||||||
|
(change)="onChange($event)"></app-settings-entry>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col pe-0">
|
||||||
|
<button class="btn btn-primary float-end"
|
||||||
|
(click)="AddNew()" i18n>+ Add Link
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
|
<ng-container *ngSwitchCase="'MapPathGroupConfig'">
|
||||||
|
<div class="container">
|
||||||
|
<div class="bg-body-tertiary row mt-1 mb-1" *ngFor="let arr of state.value; let i = index">
|
||||||
|
<div class="row mt-1 mb-1 me-0 ms-0 pe-0 ps-0">
|
||||||
|
<div class="col ps-0">
|
||||||
|
<input type="text" class="form-control"
|
||||||
|
placeholder="Name"
|
||||||
|
[(ngModel)]="arr.name"
|
||||||
|
(ngModelChange)="onChange($event)"
|
||||||
|
[name]="'arr_n_'+idName+i"
|
||||||
|
[id]="'arr_n_'+idName+i" required>
|
||||||
|
</div>
|
||||||
|
<div class="col-1 pe-0">
|
||||||
|
<button [disabled]="state.value.length == 1" (click)="remove(i)"
|
||||||
|
[ngClass]="state.value.length > 1? 'btn-danger':'btn-secondary'"
|
||||||
|
class="btn float-end">
|
||||||
|
<span class="oi oi-trash" aria-hidden="true" aria-label="Delete"></span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="row mt-1 mb-1 me-0 ms-0">
|
||||||
|
|
||||||
|
<div class="col">
|
||||||
|
<app-settings-entry
|
||||||
|
[ngModel]="arr.__state.matchers"
|
||||||
|
[name]="'arr_m_'+idName+i"
|
||||||
|
[id]="'arr_m_'+idName+i"
|
||||||
|
(change)="onChange($event)"></app-settings-entry>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col pe-0">
|
||||||
|
<button class="btn btn-primary float-end"
|
||||||
|
(click)="AddNew()" i18n>+ Add Link
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
<ng-container *ngSwitchCase="'NavigationLinkConfig'">
|
<ng-container *ngSwitchCase="'NavigationLinkConfig'">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row mt-1 mb-1 bg-body-tertiary" *ngFor="let link of state.value; let i = index">
|
<div class="row mt-1 mb-1 bg-body-tertiary" *ngFor="let link of state.value; let i = index">
|
||||||
|
@ -3,7 +3,7 @@ import {ControlValueAccessor, NG_VALIDATORS, NG_VALUE_ACCESSOR, ValidationErrors
|
|||||||
import {Utils} from '../../../../../../common/Utils';
|
import {Utils} from '../../../../../../common/Utils';
|
||||||
import {propertyTypes} from 'typeconfig/common';
|
import {propertyTypes} from 'typeconfig/common';
|
||||||
import {SearchQueryParserService} from '../../../gallery/search/search-query-parser.service';
|
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 {SettingsService} from '../../settings.service';
|
||||||
import {WebConfig} from '../../../../../../common/config/private/WebConfig';
|
import {WebConfig} from '../../../../../../common/config/private/WebConfig';
|
||||||
import {JobScheduleConfig, UserConfig} from '../../../../../../common/config/private/PrivateConfig';
|
import {JobScheduleConfig, UserConfig} from '../../../../../../common/config/private/PrivateConfig';
|
||||||
@ -206,6 +206,10 @@ export class SettingsEntryComponent
|
|||||||
this.arrayType = 'MapLayers';
|
this.arrayType = 'MapLayers';
|
||||||
} else if (this.state.arrayType === NavigationLinkConfig) {
|
} else if (this.state.arrayType === NavigationLinkConfig) {
|
||||||
this.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) {
|
} else if (this.state.arrayType === UserConfig) {
|
||||||
this.arrayType = 'UserConfig';
|
this.arrayType = 'UserConfig';
|
||||||
} else if (this.state.arrayType === JobScheduleConfig) {
|
} else if (this.state.arrayType === JobScheduleConfig) {
|
||||||
@ -220,6 +224,8 @@ export class SettingsEntryComponent
|
|||||||
this.type !== 'SearchQuery' &&
|
this.type !== 'SearchQuery' &&
|
||||||
this.arrayType !== 'MapLayers' &&
|
this.arrayType !== 'MapLayers' &&
|
||||||
this.arrayType !== 'NavigationLinkConfig' &&
|
this.arrayType !== 'NavigationLinkConfig' &&
|
||||||
|
this.arrayType !== 'MapPathGroupConfig' &&
|
||||||
|
this.arrayType !== 'MapPathGroupThemeConfig' &&
|
||||||
this.arrayType !== 'JobScheduleConfig' &&
|
this.arrayType !== 'JobScheduleConfig' &&
|
||||||
this.arrayType !== 'UserConfig') {
|
this.arrayType !== 'UserConfig') {
|
||||||
this.uiType = 'StringInput';
|
this.uiType = 'StringInput';
|
||||||
|
Loading…
Reference in New Issue
Block a user