feat(project-editor): adopt Toggle/SectionCard in homepage and widgets sections

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
sdarbinyan
2026-07-16 02:07:41 +04:00
parent 475e5ad528
commit 1c51a819ed
4 changed files with 18 additions and 16 deletions

View File

@@ -1,14 +1,13 @@
@if (homePage()) {
<section class="editor-section-card">
<h2>{{ 'builder.homepage' | translate }}</h2>
<app-section-card [title]="'builder.homepage' | translate">
<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>
<label>
<label class="toggle-row">
<app-toggle [ngModel]="section.visible !== false" (ngModelChange)="updateSection(section.id, 'visible', $event)" [ariaLabel]="'builder.visible' | translate" />
<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>
@@ -30,5 +29,5 @@
</div>
}
</div>
</section>
</app-section-card>
}