1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2025-01-14 14:43:17 +08:00

Improving metafile settings

This commit is contained in:
Patrik J. Braun 2022-01-13 23:36:32 +01:00
parent f2cba37d6d
commit 938a1386fc
2 changed files with 9 additions and 1 deletions

View File

@ -3,6 +3,7 @@ import 'reflect-metadata';
import {SortingMethods} from '../../entities/SortingMethods';
import {UserRoles} from '../../entities/UserDTO';
import {ConfigProperty, SubConfigClass} from 'typeconfig/common';
import {DatabaseType, IPrivateConfig} from '../private/PrivateConfig';
export enum MapProviders {
@ -70,7 +71,13 @@ export class MapLayers {
@SubConfigClass()
export class ClientMapConfig {
@ConfigProperty()
@ConfigProperty<boolean, IPrivateConfig>({
onNewValue: (value, config) => {
if (value === false) {
config.Client.MetaFile.gpx = false;
}
}
})
enabled: boolean = true;
@ConfigProperty({type: 'unsignedInt', description: 'Maximum number of markers to be shown on the map preview on the gallery page.'})
maxPreviewMarkers: number = 50;

View File

@ -11,6 +11,7 @@
name="*.gpx files"
description="Reads *.gpx files and renders them on the map."
i18n-description i18n-name
[disabled]="!(settingsService.Settings | async).Client.Map.enabled"
[ngModel]="states.gpx">
</app-settings-entry>