feat(project-editor): adopt SectionCard in general/branding sections
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
@if (bootstrap(); as bootstrap) {
|
@if (bootstrap(); as bootstrap) {
|
||||||
<section class="editor-section-card">
|
<app-section-card [title]="'builder.branding' | translate">
|
||||||
<h2>{{ 'builder.branding' | translate }}</h2>
|
|
||||||
<div class="editor-grid two">
|
<div class="editor-grid two">
|
||||||
<app-form-field [label]="'builder.logo' | translate" [hint]="'builder.logoDesc' | translate">
|
<app-form-field [label]="'builder.logo' | translate" [hint]="'builder.logoDesc' | translate">
|
||||||
<div class="media-field-row">
|
<div class="media-field-row">
|
||||||
@@ -25,5 +24,5 @@
|
|||||||
</app-form-field>
|
</app-form-field>
|
||||||
</div>
|
</div>
|
||||||
<app-media-picker [open]="mediaPickerOpen" (selected)="onImagePicked($event)" (closed)="mediaPickerOpen = false" />
|
<app-media-picker [open]="mediaPickerOpen" (selected)="onImagePicked($event)" (closed)="mediaPickerOpen = false" />
|
||||||
</section>
|
</app-section-card>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,13 +7,14 @@ import { FormFieldComponent } from '../../../shared/ui/form-field/form-field.com
|
|||||||
import { ButtonComponent } from '../../../shared/ui/button/button.component';
|
import { ButtonComponent } from '../../../shared/ui/button/button.component';
|
||||||
import { MediaPickerComponent } from '../../../shared/media/media-picker/media-picker.component';
|
import { MediaPickerComponent } from '../../../shared/media/media-picker/media-picker.component';
|
||||||
import { MediaAsset } from '../../../core/media/models/media-asset.model';
|
import { MediaAsset } from '../../../core/media/models/media-asset.model';
|
||||||
|
import { SectionCardComponent } from '../../../shared/ui/section-card/section-card.component';
|
||||||
|
|
||||||
type BrandingImageField = 'logoUrl' | 'logoCompactUrl' | 'faviconUrl';
|
type BrandingImageField = 'logoUrl' | 'logoCompactUrl' | 'faviconUrl';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-project-editor-branding-section',
|
selector: 'app-project-editor-branding-section',
|
||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [FormsModule, TranslatePipe, InputComponent, FormFieldComponent, ButtonComponent, MediaPickerComponent],
|
imports: [FormsModule, TranslatePipe, InputComponent, FormFieldComponent, ButtonComponent, MediaPickerComponent, SectionCardComponent],
|
||||||
templateUrl: './branding-section.component.html',
|
templateUrl: './branding-section.component.html',
|
||||||
styleUrls: ['./section.shared.scss'],
|
styleUrls: ['./section.shared.scss'],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush
|
changeDetection: ChangeDetectionStrategy.OnPush
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
@if (bootstrap(); as bootstrap) {
|
@if (bootstrap(); as bootstrap) {
|
||||||
<section class="editor-section-card">
|
<app-section-card [title]="'builder.general' | translate">
|
||||||
<h2>{{ 'builder.general' | translate }}</h2>
|
|
||||||
<div class="editor-grid two">
|
<div class="editor-grid two">
|
||||||
<app-form-field [label]="'builder.marketplaceName' | translate" [hint]="'builder.marketplaceNameDesc' | translate">
|
<app-form-field [label]="'builder.marketplaceName' | translate" [hint]="'builder.marketplaceNameDesc' | translate">
|
||||||
<app-input [ngModel]="bootstrap.branding.brandName" (ngModelChange)="updateMarketplaceName($event)" />
|
<app-input [ngModel]="bootstrap.branding.brandName" (ngModelChange)="updateMarketplaceName($event)" />
|
||||||
@@ -20,5 +19,5 @@
|
|||||||
<app-input [ngModel]="languagesValue()" (ngModelChange)="updateSupportedLanguages($event)" />
|
<app-input [ngModel]="languagesValue()" (ngModelChange)="updateSupportedLanguages($event)" />
|
||||||
</app-form-field>
|
</app-form-field>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</app-section-card>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,11 +4,12 @@ import { ProjectEditorFacade } from '../facade/project-editor.facade';
|
|||||||
import { TranslatePipe } from '../../../i18n/translate.pipe';
|
import { TranslatePipe } from '../../../i18n/translate.pipe';
|
||||||
import { InputComponent } from '../../../shared/ui/input/input.component';
|
import { InputComponent } from '../../../shared/ui/input/input.component';
|
||||||
import { FormFieldComponent } from '../../../shared/ui/form-field/form-field.component';
|
import { FormFieldComponent } from '../../../shared/ui/form-field/form-field.component';
|
||||||
|
import { SectionCardComponent } from '../../../shared/ui/section-card/section-card.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-project-editor-general-section',
|
selector: 'app-project-editor-general-section',
|
||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [FormsModule, TranslatePipe, InputComponent, FormFieldComponent],
|
imports: [FormsModule, TranslatePipe, InputComponent, FormFieldComponent, SectionCardComponent],
|
||||||
templateUrl: './general-section.component.html',
|
templateUrl: './general-section.component.html',
|
||||||
styleUrls: ['./section.shared.scss'],
|
styleUrls: ['./section.shared.scss'],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush
|
changeDetection: ChangeDetectionStrategy.OnPush
|
||||||
|
|||||||
Reference in New Issue
Block a user