2026-07-13 08:57:42 +04:00
|
|
|
<section class="editor-section-card">
|
|
|
|
|
<div class="editor-actions">
|
|
|
|
|
<h2>{{ 'builder.navigationHeader' | translate }}</h2>
|
|
|
|
|
<button type="button" (click)="addLink('header')">{{ 'builder.addLink' | translate }}</button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="stack-list">
|
|
|
|
|
@for (item of headerLinks(); track item.id) {
|
|
|
|
|
<article class="sub-card">
|
|
|
|
|
<div class="editor-actions">
|
|
|
|
|
<h3>{{ labelOf(item) }}</h3>
|
|
|
|
|
<div class="editor-actions">
|
|
|
|
|
<button type="button" class="secondary" (click)="move('header', item.id, -1)">↑</button>
|
|
|
|
|
<button type="button" class="secondary" (click)="move('header', item.id, 1)">↓</button>
|
|
|
|
|
<button type="button" class="secondary" (click)="removeLink('header', item.id)">{{ 'builder.removeLink' | translate }}</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="editor-grid three">
|
feat(project-editor): finish field descriptions + enum dropdowns across all sections
Wires up the remaining editor sections (theme, header, footer, homepage,
widgets, features, languages, navigation) with the description text and
dropdown UX started for General/Branding:
- Every enum-backed field is now a <select> with a description per option,
not free text: theme.mode, the new site-wide layout.type (previously had
no editor at all - added to the Theme section, and added to that
section's reset-scope), homepage section layout.strategy, and
catalog.navigationMode (also previously unedited, added to Features).
- Every other field (colors, header toggles, footer contact/company fields,
widget props, feature flags, language add, nav link label/url/visible)
gets a one-line plain-language description under its label via the new
*Desc i18n keys (en/ru/hy) prepared earlier.
- Genuinely open text (widget layout variant strings, JSON props) stays
free text, description-only, per the existing widgetLayoutDesc/widgetJsonDesc
wording - not force-fit into a dropdown.
Verified: tsc --noEmit and ng build both clean.
2026-07-15 00:45:41 +04:00
|
|
|
<label><span>{{ 'builder.linkLabel' | translate }}</span><small class="field-desc">{{ 'builder.linkLabelDesc' | translate }}</small><input type="text" [ngModel]="labelOf(item)" (ngModelChange)="updateLabel('header', item.id, $event)" /></label>
|
|
|
|
|
<label><span>{{ 'builder.linkUrl' | translate }}</span><small class="field-desc">{{ 'builder.linkUrlDesc' | translate }}</small><input type="text" [ngModel]="item.route" (ngModelChange)="updateRoute('header', item.id, $event)" /></label>
|
|
|
|
|
<label class="toggle-row"><input type="checkbox" [checked]="item.visible !== false" (change)="updateVisible('header', item.id, $any($event.target).checked)" /><span>{{ 'builder.visible' | translate }}</span><small class="field-desc">{{ 'builder.linkVisibleDesc' | translate }}</small></label>
|
2026-07-13 08:57:42 +04:00
|
|
|
</div>
|
|
|
|
|
</article>
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="editor-actions">
|
|
|
|
|
<h2>{{ 'builder.navigationFooter' | translate }}</h2>
|
|
|
|
|
@if (footerLinks(); as footer) {
|
|
|
|
|
<button type="button" (click)="addLink('footer')">{{ 'builder.addLink' | translate }}</button>
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
@if (footerLinks(); as footer) {
|
|
|
|
|
<div class="stack-list">
|
|
|
|
|
@for (item of footer; track item.id) {
|
|
|
|
|
<article class="sub-card">
|
|
|
|
|
<div class="editor-actions">
|
|
|
|
|
<h3>{{ labelOf(item) }}</h3>
|
|
|
|
|
<div class="editor-actions">
|
|
|
|
|
<button type="button" class="secondary" (click)="move('footer', item.id, -1)">↑</button>
|
|
|
|
|
<button type="button" class="secondary" (click)="move('footer', item.id, 1)">↓</button>
|
|
|
|
|
<button type="button" class="secondary" (click)="removeLink('footer', item.id)">{{ 'builder.removeLink' | translate }}</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="editor-grid three">
|
feat(project-editor): finish field descriptions + enum dropdowns across all sections
Wires up the remaining editor sections (theme, header, footer, homepage,
widgets, features, languages, navigation) with the description text and
dropdown UX started for General/Branding:
- Every enum-backed field is now a <select> with a description per option,
not free text: theme.mode, the new site-wide layout.type (previously had
no editor at all - added to the Theme section, and added to that
section's reset-scope), homepage section layout.strategy, and
catalog.navigationMode (also previously unedited, added to Features).
- Every other field (colors, header toggles, footer contact/company fields,
widget props, feature flags, language add, nav link label/url/visible)
gets a one-line plain-language description under its label via the new
*Desc i18n keys (en/ru/hy) prepared earlier.
- Genuinely open text (widget layout variant strings, JSON props) stays
free text, description-only, per the existing widgetLayoutDesc/widgetJsonDesc
wording - not force-fit into a dropdown.
Verified: tsc --noEmit and ng build both clean.
2026-07-15 00:45:41 +04:00
|
|
|
<label><span>{{ 'builder.linkLabel' | translate }}</span><small class="field-desc">{{ 'builder.linkLabelDesc' | translate }}</small><input type="text" [ngModel]="labelOf(item)" (ngModelChange)="updateLabel('footer', item.id, $event)" /></label>
|
|
|
|
|
<label><span>{{ 'builder.linkUrl' | translate }}</span><small class="field-desc">{{ 'builder.linkUrlDesc' | translate }}</small><input type="text" [ngModel]="item.route" (ngModelChange)="updateRoute('footer', item.id, $event)" /></label>
|
|
|
|
|
<label class="toggle-row"><input type="checkbox" [checked]="item.visible !== false" (change)="updateVisible('footer', item.id, $any($event.target).checked)" /><span>{{ 'builder.visible' | translate }}</span><small class="field-desc">{{ 'builder.linkVisibleDesc' | translate }}</small></label>
|
2026-07-13 08:57:42 +04:00
|
|
|
</div>
|
|
|
|
|
</article>
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
} @else {
|
|
|
|
|
<p class="editor-error">{{ 'builder.navigationFooterGrouped' | translate }}</p>
|
|
|
|
|
}
|
|
|
|
|
</section>
|