diff --git a/src/app/features/project-editor/sections/features-section.component.html b/src/app/features/project-editor/sections/features-section.component.html index a57ca50..53e87fd 100644 --- a/src/app/features/project-editor/sections/features-section.component.html +++ b/src/app/features/project-editor/sections/features-section.component.html @@ -1,16 +1,15 @@ @if (bootstrap(); as bootstrap) { -
-

{{ 'builder.marketplaceFeatures' | translate }}

+
- - - - - - - - - + + + + + + + + +
-
+ } diff --git a/src/app/features/project-editor/sections/features-section.component.ts b/src/app/features/project-editor/sections/features-section.component.ts index c930b20..e0c25ab 100644 --- a/src/app/features/project-editor/sections/features-section.component.ts +++ b/src/app/features/project-editor/sections/features-section.component.ts @@ -2,6 +2,8 @@ import { ChangeDetectionStrategy, Component, inject } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { ProjectEditorFacade } from '../facade/project-editor.facade'; import { TranslatePipe } from '../../../i18n/translate.pipe'; +import { SectionCardComponent } from '../../../shared/ui/section-card/section-card.component'; +import { ToggleComponent } from '../../../shared/ui/toggle/toggle.component'; export interface CatalogNavigationOption { value: 'default' | 'left-category-navigation' | 'mega-category-layout' | 'top-category-carousel'; @@ -12,7 +14,7 @@ export interface CatalogNavigationOption { @Component({ selector: 'app-project-editor-features-section', standalone: true, - imports: [FormsModule, TranslatePipe], + imports: [FormsModule, TranslatePipe, SectionCardComponent, ToggleComponent], templateUrl: './features-section.component.html', styleUrls: ['./section.shared.scss'], changeDetection: ChangeDetectionStrategy.OnPush @@ -43,17 +45,13 @@ export class ProjectEditorFeaturesSectionComponent { this.facade.updateBootstrap(current => ({ ...current, featureFlags: { ...current.featureFlags, [key]: checked } })); } - toggleRecentViewed(checked: boolean): void { - this.facade.updateBootstrap(current => ({ ...current, userExperience: { ...current.userExperience, recentlyViewed: { ...current.userExperience!, recentlyViewed: undefined } as any } })); - } - toggleUserExperience(path: 'recentlyViewed' | 'wishlist' | 'compare', checked: boolean): void { this.facade.updateBootstrap(current => ({ ...current, userExperience: { ...current.userExperience, [path]: { - ...(current.userExperience as any)?.[path], + ...current.userExperience?.[path], enabled: checked } } @@ -70,7 +68,7 @@ export class ProjectEditorFeaturesSectionComponent { productPage: { ...current.productPage, [section]: { - ...(current.productPage as any)?.[section], + ...current.productPage?.[section], enabled: checked } }