Files
marketplaces/src/app/features/project-editor/sections/navigation-section.component.html

58 lines
3.1 KiB
HTML
Raw Normal View History

<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">
<label><span>{{ 'builder.linkLabel' | translate }}</span><input type="text" [ngModel]="labelOf(item)" (ngModelChange)="updateLabel('header', item.id, $event)" /></label>
<label><span>{{ 'builder.linkUrl' | translate }}</span><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></label>
</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">
<label><span>{{ 'builder.linkLabel' | translate }}</span><input type="text" [ngModel]="labelOf(item)" (ngModelChange)="updateLabel('footer', item.id, $event)" /></label>
<label><span>{{ 'builder.linkUrl' | translate }}</span><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></label>
</div>
</article>
}
</div>
} @else {
<p class="editor-error">{{ 'builder.navigationFooterGrouped' | translate }}</p>
}
</section>