diff --git a/src/common/config/public/ClientConfig.ts b/src/common/config/public/ClientConfig.ts index 48db7662..d18f773a 100644 --- a/src/common/config/public/ClientConfig.ts +++ b/src/common/config/public/ClientConfig.ts @@ -966,6 +966,7 @@ export class ClientGalleryConfig { @ConfigProperty({ tags: { name: $localize`Themes`, + uiIcon: 'brush', priority: ConfigPriority.advanced, } as TAGS, description: $localize`Pigallery2 uses Bootstrap 5.3 (https://getbootstrap.com/docs/5.3) for design (css, layout). In dark mode it sets 'data-bs-theme="dark"' to the to take advantage bootstrap's color modes. For theming, read more at: https://getbootstrap.com/docs/5.3/customize/color-modes/` diff --git a/src/frontend/app/ui/admin/admin.component.html b/src/frontend/app/ui/admin/admin.component.html index 73089d4d..1a030af5 100644 --- a/src/frontend/app/ui/admin/admin.component.html +++ b/src/frontend/app/ui/admin/admin.component.html @@ -110,7 +110,6 @@ #setting #tmpl [ConfigPath]="cp" - [enableNesting]="cp=='Media'" [hidden]="!tmpl.HasAvailableSettings"> diff --git a/src/frontend/app/ui/settings/template/template.component.html b/src/frontend/app/ui/settings/template/template.component.html index 77b4f260..d14ef645 100644 --- a/src/frontend/app/ui/settings/template/template.component.html +++ b/src/frontend/app/ui/settings/template/template.component.html @@ -84,7 +84,7 @@ [ngModel]="rStates?.value.__state[ck]"> -
+
{{rStates?.value.__state[ck].tags?.name || ck}} @@ -94,7 +94,7 @@ >
- +
{{rStates?.value.__state[ck].tags?.name || ck}}
diff --git a/src/frontend/app/ui/settings/template/template.component.ts b/src/frontend/app/ui/settings/template/template.component.ts index faac1f81..db85707b 100644 --- a/src/frontend/app/ui/settings/template/template.component.ts +++ b/src/frontend/app/ui/settings/template/template.component.ts @@ -59,7 +59,6 @@ export class TemplateComponent implements OnInit, OnChanges, OnDestroy, ISetting public icon: string; @Input() ConfigPath: string; - @Input() enableNesting: boolean; nestedConfigs: { id: string, name: string, visible: () => boolean, icon: string }[] = []; @ViewChild('settingsForm', {static: true}) @@ -95,9 +94,9 @@ export class TemplateComponent implements OnInit, OnChanges, OnDestroy, ISetting } this.name = this.states.tags?.name || this.ConfigPath; this.nestedConfigs = []; - if (this.enableNesting) { for (const key of this.getKeys(this.states)) { - if (this.states.value.__state[key].isConfigType) { + if (this.states.value.__state[key].isConfigType && + this.states?.value.__state[key].tags?.uiIcon) { this.nestedConfigs.push({ id: this.ConfigPath + '.' + key, name: this.states?.value.__state[key].tags?.name, @@ -106,7 +105,7 @@ export class TemplateComponent implements OnInit, OnChanges, OnDestroy, ISetting }); } } - } + } ngOnInit(): void {