feat(builder): add project editor

This commit is contained in:
sdarbinyan
2026-07-10 13:43:53 +04:00
parent 7161a81068
commit e2c8747fcc
50 changed files with 1656 additions and 42 deletions

View File

@@ -0,0 +1,25 @@
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 { ThemePaletteConfig } from '../../../shared/models/config';
@Component({
selector: 'app-project-editor-theme-section',
standalone: true,
imports: [FormsModule, TranslatePipe],
templateUrl: './theme-section.component.html',
styleUrls: ['./section.shared.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class ProjectEditorThemeSectionComponent {
private readonly facade = inject(ProjectEditorFacade);
readonly bootstrap = this.facade.bootstrap;
updatePalette<K extends keyof ThemePaletteConfig>(key: K, value: string): void {
this.facade.updateBootstrap(current => ({
...current,
theme: { ...current.theme, palette: { ...current.theme.palette, [key]: value } }
}));
}
}