2026-07-10 13:43:53 +04:00
|
|
|
@if (homePage()) {
|
|
|
|
|
<section class="editor-section-card">
|
|
|
|
|
<h2>{{ 'builder.homepage' | translate }}</h2>
|
|
|
|
|
<div cdkDropList class="sortable-list" (cdkDropListDropped)="drop($event)">
|
|
|
|
|
@for (section of sections(); track section.id) {
|
|
|
|
|
<div class="sortable-item" cdkDrag>
|
|
|
|
|
<div class="editor-grid four compact">
|
|
|
|
|
<strong>{{ section.id }}</strong>
|
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.visible' | translate }}</span>
|
|
|
|
|
<input type="checkbox" [checked]="section.visible !== false" (change)="updateSection(section.id, 'visible', $any($event.target).checked)" />
|
|
|
|
|
<small class="field-desc">{{ 'builder.sectionVisibleDesc' | translate }}</small>
|
|
|
|
|
</label>
|
|
|
|
|
<label>
|
|
|
|
|
<span>{{ 'builder.layoutStrategyLabel' | translate }}</span>
|
|
|
|
|
<small class="field-desc">{{ 'builder.layoutStrategyDesc' | translate }}</small>
|
|
|
|
|
<select [ngModel]="section.layout?.strategy || 'stack'" (ngModelChange)="updateLayout(section.id, 'strategy', $event)">
|
|
|
|
|
@for (option of layoutStrategyOptions; track option.value) {
|
|
|
|
|
<option [value]="option.value">{{ option.labelKey | translate }}</option>
|
|
|
|
|
}
|
|
|
|
|
</select>
|
|
|
|
|
<small class="field-desc">{{ layoutStrategyDescKey(section.layout?.strategy || 'stack') | translate }}</small>
|
|
|
|
|
</label>
|
|
|
|
|
<label>
|
|
|
|
|
<span>{{ 'builder.columns' | translate }}</span>
|
|
|
|
|
<small class="field-desc">{{ 'builder.sectionColumnsDesc' | translate }}</small>
|
|
|
|
|
<input type="number" [ngModel]="section.layout?.columns || 1" (ngModelChange)="updateLayout(section.id, 'columns', $event)" />
|
|
|
|
|
</label>
|
2026-07-10 13:43:53 +04:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
}
|