2026-07-17 09:00:47 +04:00
|
|
|
<app-section-card [title]="'builder.previewChangesTitle' | translate">
|
|
|
|
|
@if (issues().length > 0) {
|
|
|
|
|
<ul class="preview-validation" [class.has-errors]="hasBlockingIssues()">
|
|
|
|
|
@for (issue of issues(); track issue.code) {
|
|
|
|
|
<li [class.is-warning]="issue.severity === 'warning'" [class.is-error]="issue.severity === 'error'">{{ issue.message | translate }}</li>
|
|
|
|
|
}
|
|
|
|
|
</ul>
|
|
|
|
|
} @else {
|
|
|
|
|
<p class="preview-validation-ok">{{ 'builder.previewNoIssues' | translate }}</p>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@if (changeSummary().length > 0) {
|
|
|
|
|
<table class="preview-changes">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th>{{ 'builder.previewChangeField' | translate }}</th>
|
|
|
|
|
<th>{{ 'builder.previewChangeBefore' | translate }}</th>
|
|
|
|
|
<th>{{ 'builder.previewChangeAfter' | translate }}</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
@for (row of changeSummary(); track row.fieldKey) {
|
|
|
|
|
<tr>
|
|
|
|
|
<td>{{ row.labelKey | translate }}</td>
|
|
|
|
|
<td class="preview-before">{{ row.before || '—' }}</td>
|
|
|
|
|
<td class="preview-after">{{ row.after || '—' }}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
}
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
} @else {
|
|
|
|
|
<p class="preview-validation-ok">{{ 'builder.previewNoChanges' | translate }}</p>
|
|
|
|
|
}
|
|
|
|
|
</app-section-card>
|
|
|
|
|
|
2026-07-16 02:14:03 +04:00
|
|
|
<app-section-card [title]="'builder.preview' | translate">
|
2026-07-10 13:43:53 +04:00
|
|
|
<div class="editor-actions">
|
feat(project-editor): adopt Design System primitives across editor sections
Applied app-input/app-form-field/app-button to 9 of 11 Project Editor
sections: general, branding, theme, footer, homepage, widgets, languages,
navigation, preview. header and features sections were left unchanged -
they contain only checkboxes and selects, and no Checkbox/Select primitive
exists yet.
Theme section's 8 color pickers stay native <input type=color> (app-input's
type union doesn't include 'color') but are now wrapped in app-form-field
for consistent label/hint treatment. Added app-form-field.full grid-column
rule to section.shared.scss (shared by all 11 sections) alongside the
existing label.full rule, since the custom element doesn't match that
selector.
Production build green, arch:check passes.
2026-07-15 07:55:38 +04:00
|
|
|
<app-button variant="primary" (click)="preview()">{{ 'builder.livePreview' | translate }}</app-button>
|
|
|
|
|
<app-button variant="secondary" (click)="refreshExport()">{{ 'builder.exportBootstrap' | translate }}</app-button>
|
|
|
|
|
<app-button variant="secondary" (click)="importDraft()">{{ 'builder.importBootstrap' | translate }}</app-button>
|
2026-07-10 13:43:53 +04:00
|
|
|
</div>
|
|
|
|
|
@if (importError()) {
|
|
|
|
|
<p class="editor-error">{{ importError()! | translate }}</p>
|
|
|
|
|
}
|
|
|
|
|
<label>
|
|
|
|
|
<span>{{ 'builder.exportedBootstrap' | translate }}</span>
|
|
|
|
|
<textarea rows="10" [ngModel]="exportValue()" (ngModelChange)="exportValue.set($event)"></textarea>
|
|
|
|
|
</label>
|
|
|
|
|
<label>
|
|
|
|
|
<span>{{ 'builder.importSource' | translate }}</span>
|
|
|
|
|
<textarea rows="10" [ngModel]="importValue()" (ngModelChange)="importValue.set($event)"></textarea>
|
|
|
|
|
</label>
|
2026-07-16 02:14:03 +04:00
|
|
|
</app-section-card>
|