mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
Moving Themes to be visible on side menu in settings #587
This commit is contained in:
parent
79187633cb
commit
92ff423794
@ -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 <html> to take advantage bootstrap's color modes. For theming, read more at: https://getbootstrap.com/docs/5.3/customize/color-modes/`
|
||||
|
@ -110,7 +110,6 @@
|
||||
#setting
|
||||
#tmpl
|
||||
[ConfigPath]="cp"
|
||||
[enableNesting]="cp=='Media'"
|
||||
[hidden]="!tmpl.HasAvailableSettings">
|
||||
<ng-container
|
||||
*ngIf="cp=='Indexing'">
|
||||
|
@ -84,7 +84,7 @@
|
||||
[ngModel]="rStates?.value.__state[ck]">
|
||||
</app-settings-entry>
|
||||
<ng-container *ngIf="rStates.value.__state[ck].isConfigType">
|
||||
<div class="card mt-2 mb-2" *ngIf="topLevel && enableNesting" [id]="ConfigPath+'.'+ck">
|
||||
<div class="card mt-2 mb-2" *ngIf="topLevel && rStates?.value.__state[ck].tags?.uiIcon" [id]="ConfigPath+'.'+ck">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title"><span
|
||||
class="oi oi-{{rStates?.value.__state[ck].tags?.uiIcon}}"></span> {{rStates?.value.__state[ck].tags?.name || ck}}
|
||||
@ -94,7 +94,7 @@
|
||||
></ng-container>
|
||||
</div>
|
||||
</div>
|
||||
<ng-container *ngIf="!topLevel || !enableNesting">
|
||||
<ng-container *ngIf="!topLevel || !rStates?.value.__state[ck].tags?.uiIcon">
|
||||
<div class="row mt-2">
|
||||
<div class="col-auto">
|
||||
<h5>{{rStates?.value.__state[ck].tags?.name || ck}}</h5>
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user